Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minecraft-data

Package Overview
Dependencies
Maintainers
1
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minecraft-data - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

14

doc/api.md

@@ -92,1 +92,15 @@ # API

find a block or an item by its name
## Windows
### node-minecraft-data.windows
windows indexed by id
### node-minecraft-data.windowsByName
windows indexed by name
### node-minecraft-data.windowsArray
unindexed windows

4

doc/history.md

@@ -0,1 +1,5 @@

## 0.8.0
* update protocol.json
* add windows
## 0.7.0

@@ -2,0 +6,0 @@ * update protocol.json : condition becomes switch

var mcData=require("./")("1.8.8");
console.log(mcData.blocksByName["stone"]);
console.log(mcData.windows["minecraft:brewing_stand"]);

@@ -38,3 +38,4 @@ var cache={}; // prevent reindexing when requiring multiple time the same version

entities: require(dir+'/enums/entities'),
protocol: require(dir+'/enums/protocol')
protocol: require(dir+'/enums/protocol'),
windows: require(dir+'/enums/windows')
};

@@ -68,2 +69,6 @@ }

windows: indexes.windowsById,
windowsByName: indexes.windowsByName,
windowsArray: mcData.windows,
protocol: mcData.protocol,

@@ -70,0 +75,0 @@

5

indexes.js

@@ -16,4 +16,7 @@ var indexer=require("./indexer.js");

itemsById:indexer.buildIndexFromArray(mcData.items,"id"),
itemsByName:indexer.buildIndexFromArray(mcData.items,"name")
itemsByName:indexer.buildIndexFromArray(mcData.items,"name"),
windowsById:indexer.buildIndexFromArray(mcData.windows,"id"),
windowsByName:indexer.buildIndexFromArray(mcData.windows,"name")
};
};

@@ -5,2 +5,25 @@ {

"definitions": {
"protocol":{
"type": "object",
"properties":{
"types":{"$ref": "#/definitions/types"},
"states":{"$ref": "#/definitions/states"}
},
"required":["types","states"],
"additionalProperties": false
},
"types":{
"type": "object",
"patternProperties": {
"^[a-zA-Z]+$": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false
},
"states":{
"type": "object",
"patternProperties": {
"^[a-z]+$": {"$ref": "#/definitions/directions"}
},
"additionalProperties": false
},
"directions": {

@@ -68,3 +91,4 @@ "type": "object",

{"$ref": "#/definitions/array"},
{"$ref": "#/definitions/buffer"}
{"$ref": "#/definitions/buffer"},
{"$ref": "#/definitions/option"}
]

@@ -84,2 +108,10 @@ },

},
"option": {
"type": "array",
"items":[
{"enum":["option"]},
{"$ref": "#/definitions/fieldType"}
],
"additionalItems": false
},
"switch":{

@@ -155,3 +187,3 @@ "type": "array",

"type": "string",
"pattern": "^(this\\.)?[a-zA-Z0-9_]+$"
"pattern": "^(this\\.)?.+$"
},

@@ -188,7 +220,3 @@ "fieldTypeArgsCount": {

},
"type": "object",
"patternProperties": {
"^[a-z]+$": {"$ref": "#/definitions/directions"}
},
"additionalProperties": false
"type": {"$ref": "#/definitions/protocol"}
}

@@ -61,11 +61,2 @@ {

},
"buttons": {
"description": "Names of the buttons of the window",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"additionalItems":false
},
"openedWith" : {

@@ -72,0 +63,0 @@ "type":"array",

[
{
"id": "",
"name": "Player",
"slots": [
{
"name": "craft result",
"index": 0
},
{
"name": "craft grid",
"index": 1,
"size": 4
},
{
"name": "armor",
"index": 5,
"size": 4
}
]
},
{
"id": "EntityHorse",
"name": "Horse",
"openedWith": [
{
"type": "entity",
"id": 100
}
]
},
{
"id": "minecraft:anvil",
"name": "Anvil",
"properties": [
"repair cost"
]
},
{
"id": "minecraft:beacon",

@@ -13,13 +50,9 @@ "name": "Beacon",

"level",
"effect one",
"effect two"
"effect 1",
"effect 2"
],
"buttons": [
"apply",
"cancel"
],
"openedWith":[
"openedWith": [
{
"type":"block",
"id":138
"type": "block",
"id": 138
}

@@ -45,6 +78,6 @@ ]

],
"openedWith":[
"openedWith": [
{
"type":"block",
"id":117
"type": "block",
"id": 117
}

@@ -54,11 +87,81 @@ ]

{
"id": "EntityHorse",
"name": "Horse",
"openedWith":[
"id": "minecraft:chest",
"name": "Chest"
},
{
"id": "minecraft:crafting_table",
"name": "Workbench",
"slots": [
{
"type":"entity",
"id":100
"name": "result",
"index": 0
},
{
"name": "grid",
"index": 1,
"size": 10
}
]
},
{
"id": "minecraft:dispenser",
"name": "Dispenser"
},
{
"id": "minecraft:dropper",
"name": "Dropper"
},
{
"id": "minecraft:enchanting_table",
"name": "Encantment Table",
"slots": [
{
"name": "enchanted",
"index": 0
},
{
"name": "lapis",
"index": 1
}
],
"properties": [
"xp 1",
"xp 2",
"xp 3",
"seed",
"tooltip 1",
"tooltip 2",
"tooltip 3"
]
},
{
"id": "minecraft:furnace",
"name": "Furnace",
"slots": [
{
"name": "smelted",
"index": 0
},
{
"name": "fuel",
"index": 1
},
{
"name": "result",
"index": 2
}
],
"properties": [
"progress",
"fuel"
]
},
{
"id": "minecraft:hopper",
"name": "Hopper"
},
{
"id": "minecraft:villager",
"name": "NPC Trade"
}
]
]
# minecraft-data
[![Join the chat at https://gitter.im/PrismarineJS/minecraft-data](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PrismarineJS/minecraft-data?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://circleci.com/gh/PrismarineJS/minecraft-data/tree/1.8.svg?style=shield)](https://circleci.com/gh/PrismarineJS/minecraft-data/tree/1.8)

@@ -21,3 +23,11 @@

from minecraft-data protocol.json file
## Projects using minecraft-data
These are the projects that use minecraft-data (through the wrappers) :
* [mineflayer](https://github.com/andrewrk/mineflayer)
* [node-minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol)
* [flying-squid](https://github.com/mhsjlw/flying-squid)
## Documentation

@@ -24,0 +34,0 @@

@@ -5,2 +5,25 @@ {

"definitions": {
"protocol":{
"type": "object",
"properties":{
"types":{"$ref": "#/definitions/types"},
"states":{"$ref": "#/definitions/states"}
},
"required":["types","states"],
"additionalProperties": false
},
"types":{
"type": "object",
"patternProperties": {
"^[a-zA-Z]+$": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false
},
"states":{
"type": "object",
"patternProperties": {
"^[a-z]+$": {"$ref": "#/definitions/directions"}
},
"additionalProperties": false
},
"directions": {

@@ -68,3 +91,4 @@ "type": "object",

{"$ref": "#/definitions/array"},
{"$ref": "#/definitions/buffer"}
{"$ref": "#/definitions/buffer"},
{"$ref": "#/definitions/option"}
]

@@ -84,2 +108,10 @@ },

},
"option": {
"type": "array",
"items":[
{"enum":["option"]},
{"$ref": "#/definitions/fieldType"}
],
"additionalItems": false
},
"switch":{

@@ -155,3 +187,3 @@ "type": "array",

"type": "string",
"pattern": "^(this\\.)?[a-zA-Z0-9_]+$"
"pattern": "^(this\\.)?.+$"
},

@@ -188,7 +220,3 @@ "fieldTypeArgsCount": {

},
"type": "object",
"patternProperties": {
"^[a-z]+$": {"$ref": "#/definitions/directions"}
},
"additionalProperties": false
"type": {"$ref": "#/definitions/protocol"}
}

@@ -61,11 +61,2 @@ {

},
"buttons": {
"description": "Names of the buttons of the window",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"additionalItems":false
},
"openedWith" : {

@@ -72,0 +63,0 @@ "type":"array",

[
{
"id": "",
"name": "Player",
"slots": [
{
"name": "craft result",
"index": 0
},
{
"name": "craft grid",
"index": 1,
"size": 4
},
{
"name": "armor",
"index": 5,
"size": 4
}
]
},
{
"id": "EntityHorse",
"name": "Horse",
"openedWith": [
{
"type": "entity",
"id": 100
}
]
},
{
"id": "minecraft:anvil",
"name": "Anvil",
"properties": [
"repair cost"
]
},
{
"id": "minecraft:beacon",

@@ -13,13 +50,9 @@ "name": "Beacon",

"level",
"effect one",
"effect two"
"effect 1",
"effect 2"
],
"buttons": [
"apply",
"cancel"
],
"openedWith":[
"openedWith": [
{
"type":"block",
"id":138
"type": "block",
"id": 138
}

@@ -45,6 +78,6 @@ ]

],
"openedWith":[
"openedWith": [
{
"type":"block",
"id":117
"type": "block",
"id": 117
}

@@ -54,11 +87,81 @@ ]

{
"id": "EntityHorse",
"name": "Horse",
"openedWith":[
"id": "minecraft:chest",
"name": "Chest"
},
{
"id": "minecraft:crafting_table",
"name": "Workbench",
"slots": [
{
"type":"entity",
"id":100
"name": "result",
"index": 0
},
{
"name": "grid",
"index": 1,
"size": 10
}
]
},
{
"id": "minecraft:dispenser",
"name": "Dispenser"
},
{
"id": "minecraft:dropper",
"name": "Dropper"
},
{
"id": "minecraft:enchanting_table",
"name": "Encantment Table",
"slots": [
{
"name": "enchanted",
"index": 0
},
{
"name": "lapis",
"index": 1
}
],
"properties": [
"xp 1",
"xp 2",
"xp 3",
"seed",
"tooltip 1",
"tooltip 2",
"tooltip 3"
]
},
{
"id": "minecraft:furnace",
"name": "Furnace",
"slots": [
{
"name": "smelted",
"index": 0
},
{
"name": "fuel",
"index": 1
},
{
"name": "result",
"index": 2
}
],
"properties": [
"progress",
"fuel"
]
},
{
"id": "minecraft:hopper",
"name": "Hopper"
},
{
"id": "minecraft:villager",
"name": "NPC Trade"
}
]
]
# minecraft-data
[![Join the chat at https://gitter.im/PrismarineJS/minecraft-data](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PrismarineJS/minecraft-data?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://circleci.com/gh/PrismarineJS/minecraft-data/tree/1.9.svg?style=shield)](https://circleci.com/gh/PrismarineJS/minecraft-data/tree/1.9)

@@ -21,3 +23,11 @@

from minecraft-data protocol.json file
## Projects using minecraft-data
These are the projects that use minecraft-data (through the wrappers) :
* [mineflayer](https://github.com/andrewrk/mineflayer)
* [node-minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol)
* [flying-squid](https://github.com/mhsjlw/flying-squid)
## Documentation

@@ -24,0 +34,0 @@

{
"name": "minecraft-data",
"version": "0.7.0",
"version": "0.8.0",
"description": "Provide easy access to minecraft data in node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc