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.5.2 to 0.6.0

minecraft-data/1.8/doc/make-a-new-wrapper.md

3

doc/history.md

@@ -0,1 +1,4 @@

## 0.6.0
* update protocol.json in 1.8 and 1.9 : the schema is now better for types (see minecraft-data for more details)
## 0.5.2

@@ -2,0 +5,0 @@ * update README and example : the package is now called minecraft-data in npm

124

minecraft-data/1.8/enums_schemas/protocol_schema.json

@@ -49,4 +49,3 @@ {

"name": {"$ref": "#/definitions/fieldName"},
"type": {"$ref": "#/definitions/fieldType"},
"typeArgs": {"$ref": "#/definitions/fieldTypeArgs"}
"type": {"$ref": "#/definitions/fieldType"}
},

@@ -64,36 +63,101 @@ "required": [

"fieldType": {
"oneOf":[
{"$ref": "#/definitions/simpleFieldType"},
{"$ref": "#/definitions/container"},
{"$ref": "#/definitions/condition"},
{"$ref": "#/definitions/array"},
{"$ref": "#/definitions/buffer"}
]
},
"simpleFieldType": {
"type": "string",
"pattern": "^[a-zA-Z]+$"
},
"fieldTypeArgs": {
"type": "object",
"properties": {
"type": {"$ref": "#/definitions/fieldType"},
"countType": {"$ref": "#/definitions/fieldType"},
"countFor": {"$ref": "#/definitions/fieldTypeArgsCountFor"},
"count": {"$ref": "#/definitions/fieldTypeArgsCount"},
"fields": {"$ref": "#/definitions/fields"},
"typeArgs": {"$ref": "#/definitions/fieldTypeArgs"},
"field": {"$ref": "#/definitions/fieldName"},
"values": {
"type": "array",
"items": {
"type": [
"integer",
"boolean",
"string"
]
"container": {
"type": "array",
"items":[
{"enum":["container"]},
{"$ref": "#/definitions/fields"}
],
"additionalItems": false
},
"condition": {
"type": "array",
"items":[
{"enum":["condition"]},
{
"type":"object",
"properties": {
"type": {"$ref": "#/definitions/fieldType"},
"field": {"$ref": "#/definitions/fieldName"},
"values": {
"type": "array",
"items": {
"type": [
"integer",
"boolean",
"string"
]
},
"additionalItems": false,
"minItems": 1
},
"different": {
"type": "boolean"
},
"this": {
"type": "boolean"
}
},
"additionalItems": false,
"minItems": 1
},
"different": {
"type": "boolean"
},
"this": {
"type": "boolean"
"required":["type","field","values"],
"additionalProperties": false
}
},
"additionalProperties": false
],
"additionalItems": false
},
"array":{
"type":"array",
"items":[
{"enum":["array"]},
{
"oneOf":[
{
"type":"object",
"properties":{
"type": {"$ref": "#/definitions/fieldType"},
"countType": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false,
"required":["type","countType"]
},
{
"type":"object",
"properties":{
"type": {"$ref": "#/definitions/fieldType"},
"count": {"$ref": "#/definitions/fieldTypeArgsCount"}
},
"additionalProperties": false,
"required":["type","count"]
}
]
}
],
"additionalItems": false
},
"buffer":{
"type":"array",
"items":[
{"enum":["buffer"]},
{
"type": "object",
"properties": {
"countType": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false,
"required": [
"countType"
]
}
]
},
"fieldTypeArgsCountFor": {

@@ -100,0 +164,0 @@ "type": "string",

@@ -94,13 +94,13 @@ {

"name": "publicKey",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{ "countType": "varint" }
]
},
{
"name": "verifyToken",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{ "countType": "varint" }
]
}

@@ -147,13 +147,13 @@ ]

"name": "sharedSecret",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{ "countType": "varint" }
]
},
{
"name": "verifyToken",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{ "countType": "varint" }
]
}

@@ -449,5 +449,5 @@ ]

"name": "objectData",
"type": "container",
"typeArgs": {
"fields": [
"type": [
"container",
[
{

@@ -459,41 +459,47 @@ "name": "intField",

"name": "velocityX",
"type": "condition",
"typeArgs": {
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
"type": [
"condition",
{
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
]
},
{
"name": "velocityY",
"type": "condition",
"typeArgs": {
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
"type": [
"condition",
{
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
]
},
{
"name": "velocityZ",
"type": "condition",
"typeArgs": {
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
"type": [
"condition",
{
"type": "short",
"field": "intField",
"values": [
0
],
"different": true,
"this": true
}
]
}
]
}
]
}

@@ -627,7 +633,9 @@ ]

"name": "entityIds",
"type": "array",
"typeArgs": {
"type": "varint",
"countType": "varint"
}
"type": [
"array",
{
"type": "varint",
"countType": "varint"
}
]
}

@@ -877,43 +885,47 @@ ]

"name": "properties",
"type": "array",
"typeArgs": {
"countType": "int",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "double"
},
{
"name": "modifiers",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "UUID",
"type": "UUID"
},
{
"name": "amount",
"type": "double"
},
{
"name": "operation",
"type": "byte"
}
]
}
"type": [
"array",
{
"countType": "int",
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "double"
},
{
"name": "modifiers",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "UUID",
"type": "UUID"
},
{
"name": "amount",
"type": "double"
},
{
"name": "operation",
"type": "byte"
}
]
]
}
]
}
}
]
]
}
}
]
}

@@ -943,6 +955,6 @@ ]

"name": "chunkData",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{ "countType": "varint" }
]
}

@@ -964,23 +976,25 @@ ]

"name": "records",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "horizontalPos",
"type": "ubyte"
},
{
"name": "y",
"type": "ubyte"
},
{
"name": "blockId",
"type": "varint"
}
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "horizontalPos",
"type": "ubyte"
},
{
"name": "y",
"type": "ubyte"
},
{
"name": "blockId",
"type": "varint"
}
]
]
}
}
]
}

@@ -1049,23 +1063,25 @@ ]

"name": "meta",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "x",
"type": "int"
},
{
"name": "z",
"type": "int"
},
{
"name": "bitMap",
"type": "ushort"
}
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "x",
"type": "int"
},
{
"name": "z",
"type": "int"
},
{
"name": "bitMap",
"type": "ushort"
}
]
]
}
}
]
},

@@ -1099,23 +1115,25 @@ {

"name": "affectedBlockOffsets",
"type": "array",
"typeArgs": {
"countType": "int",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
},
{
"name": "z",
"type": "byte"
}
"type": [
"array",
{
"countType": "int",
"type": [
"container",
[
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
},
{
"name": "z",
"type": "byte"
}
]
]
}
}
]
},

@@ -1231,15 +1249,17 @@ {

"name": "data",
"type": "array",
"typeArgs": {
"count": {
"field": "particleId",
"map": {
"36": 2,
"37": 1,
"38": 1
"type": [
"array",
{
"count": {
"field": "particleId",
"map": {
"36": 2,
"37": 1,
"38": 1
},
"default": 0
},
"default": 0
},
"type": "varint"
}
"type": "varint"
}
]
}

@@ -1307,10 +1327,12 @@ ]

"name": "entityId",
"type": "condition",
"typeArgs": {
"field": "inventoryType",
"values": [
"EntityHorse"
],
"type": "int"
}
"type": [
"condition",
{
"field": "inventoryType",
"values": [
"EntityHorse"
],
"type": "int"
}
]
}

@@ -1354,7 +1376,9 @@ ]

"name": "items",
"type": "array",
"typeArgs": {
"type": "slot",
"countType": "short"
}
"type": [
"array",
{
"type": "slot",
"countType": "short"
}
]
}

@@ -1435,23 +1459,25 @@ ]

"name": "icons",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "directionAndType",
"type": "byte"
},
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
}
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "directionAndType",
"type": "byte"
},
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
}
]
]
}
}
]
},

@@ -1464,50 +1490,58 @@ {

"name": "rows",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "x",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "y",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "data",
"type": "condition",
"typeArgs": {
"type": "buffer",
"typeArgs": {
"countType": "varint"
},
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": [
"buffer",
{ "countType": "varint" }
],
"field": "columns",
"values": [
0
],
"different": true
}
]
}

@@ -1547,19 +1581,21 @@ ]

"name": "entries",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
]
]
}
}
]
}

@@ -1577,117 +1613,135 @@ ]

"name": "data",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "UUID",
"type": "UUID"
},
{
"name": "name",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "UUID",
"type": "UUID"
},
{
"name": "name",
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0
]
}
]
}
},
{
"name": "properties",
"type": "condition",
"typeArgs": {
"type": "array",
"field": "action",
"values": [
0
],
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
},
{
"name": "properties",
"type": [
"condition",
{
"field": "action",
"values": [
0
],
"type": [
"array",
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "isSigned",
"type": "bool"
},
{
"name": "signature",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "isSigned",
"values": [
true
],
"this": true
}
"countType": "varint",
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "isSigned",
"type": "bool"
},
{
"name": "signature",
"type": [
"condition",
{
"type": "string",
"field": "isSigned",
"values": [
true
],
"this": true
}
]
}
]
]
}
]
}
}
}
},
{
"name": "gamemode",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
1
]
}
},
{
"name": "ping",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
2
},
{
"name": "gamemode",
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
1
]
}
]
}
},
{
"name": "hasDisplayName",
"type": "condition",
"typeArgs": {
"type": "bool",
"field": "action",
"values": [
0,
3
},
{
"name": "ping",
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
2
]
}
]
}
},
{
"name": "displayName",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "hasDisplayName",
"this": true,
"values": [
true
},
{
"name": "hasDisplayName",
"type": [
"condition",
{
"type": "bool",
"field": "action",
"values": [
0,
3
]
}
]
},
{
"name": "displayName",
"type": [
"condition",
{
"type": "string",
"field": "hasDisplayName",
"this": true,
"values": [
true
]
}
]
}
}
]
]
}
}
]
}

@@ -1718,7 +1772,9 @@ ]

"name": "matches",
"type": "array",
"typeArgs": {
"type": "string",
"countType": "varint"
}
"type": [
"array",
{
"type": "string",
"countType": "varint"
}
]
}

@@ -1740,23 +1796,27 @@ ]

"name": "displayText",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
2
]
}
]
},
{
"name": "type",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
2
]
}
]
}

@@ -1782,11 +1842,13 @@ ]

"name": "value",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
1
],
"different": true
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
1
],
"different": true
}
]
}

@@ -1821,88 +1883,104 @@ ]

"name": "name",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "prefix",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "suffix",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "friendlyFire",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "nameTagVisibility",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "color",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "players",
"type": "condition",
"typeArgs": {
"type": "array",
"field": "mode",
"values": [
0,
3,
4
],
"typeArgs": {
"type": "string",
"countType": "varint"
"type": [
"condition",
{
"field": "mode",
"values": [
0,
3,
4
],
"type": [
"array",
{
"type": "string",
"countType": "varint"
}
]
}
}
]
}

@@ -1951,44 +2029,52 @@ ]

"name": "duration",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "event",
"values": [
1
]
}
"type": [
"condition",
{
"type": "varint",
"field": "event",
"values": [
1
]
}
]
},
{
"name": "playerId",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "event",
"values": [
2
]
}
"type": [
"condition",
{
"type": "varint",
"field": "event",
"values": [
2
]
}
]
},
{
"name": "entityId",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "event",
"values": [
1,
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "event",
"values": [
1,
2
]
}
]
},
{
"name": "message",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "event",
"values": [
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "event",
"values": [
2
]
}
]
}

@@ -2015,105 +2101,123 @@ ]

"name": "radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
0
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
0
]
}
]
},
{
"name": "x",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
2,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
2,
3
]
}
]
},
{
"name": "z",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
2,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
2,
3
]
}
]
},
{
"name": "old_radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "new_radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "speed",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "portalBoundary",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
3
]
}
]
},
{
"name": "warning_time",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
4,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
4,
3
]
}
]
},
{
"name": "warning_blocks",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
5,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
5,
3
]
}
]
}

@@ -2131,44 +2235,52 @@ ]

"name": "text",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
1
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
1
]
}
]
},
{
"name": "fadeIn",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
},
{
"name": "stay",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
},
{
"name": "fadeOut",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
}

@@ -2258,32 +2370,38 @@ ]

"name": "x",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
},
{
"name": "y",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
},
{
"name": "z",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
}

@@ -2597,10 +2715,12 @@ ]

"name": "block",
"type": "condition",
"typeArgs": {
"type": "position",
"field": "hasPosition",
"values": [
true
]
}
"type": [
"condition",
{
"type": "position",
"field": "hasPosition",
"values": [
true
]
}
]
}

@@ -2607,0 +2727,0 @@ ]

@@ -8,10 +8,20 @@ # minecraft-data

## Wrappers
Minecraft-data is language independent, you can use it with these language specific modules :
* [node-minecraft-data](https://github.com/PrismarineJS/node-minecraft-data) provides indexes and look up functions in node.js
* [python-minecraft-data](https://github.com/rom1504/python-minecraft-data) provides indexes and look up functions in python
If you want to use minecraft-data in a new language, we advise you to [create a new wrapper](doc/make-a-new-wrapper.md)
There are also some projects that wrap parts of minecraft-data in other ways :
* [ProtocolGen](https://github.com/Johni0702/ProtocolGen) that generate java files reading and writing the protocol
from minecraft-data protocol.json file
## Documentation
* See [doc/history.md](doc/history.md)
* [Documentation generated using the json schemas and docson](http://prismarinejs.github.io/minecraft-data/)
* [Documentation generated using the json schemas and docson](http://prismarinejs.github.io/minecraft-data/?v=1.8)
* [Textual documentation of the recipe format](doc/recipes.md)

@@ -18,0 +28,0 @@

@@ -49,4 +49,3 @@ {

"name": {"$ref": "#/definitions/fieldName"},
"type": {"$ref": "#/definitions/fieldType"},
"typeArgs": {"$ref": "#/definitions/fieldTypeArgs"}
"type": {"$ref": "#/definitions/fieldType"}
},

@@ -64,36 +63,101 @@ "required": [

"fieldType": {
"oneOf":[
{"$ref": "#/definitions/simpleFieldType"},
{"$ref": "#/definitions/container"},
{"$ref": "#/definitions/condition"},
{"$ref": "#/definitions/array"},
{"$ref": "#/definitions/buffer"}
]
},
"simpleFieldType": {
"type": "string",
"pattern": "^[a-zA-Z]+$"
},
"fieldTypeArgs": {
"type": "object",
"properties": {
"type": {"$ref": "#/definitions/fieldType"},
"countType": {"$ref": "#/definitions/fieldType"},
"countFor": {"$ref": "#/definitions/fieldTypeArgsCountFor"},
"count": {"$ref": "#/definitions/fieldTypeArgsCount"},
"fields": {"$ref": "#/definitions/fields"},
"typeArgs": {"$ref": "#/definitions/fieldTypeArgs"},
"field": {"$ref": "#/definitions/fieldName"},
"values": {
"type": "array",
"items": {
"type": [
"integer",
"boolean",
"string"
]
"container": {
"type": "array",
"items":[
{"enum":["container"]},
{"$ref": "#/definitions/fields"}
],
"additionalItems": false
},
"condition": {
"type": "array",
"items":[
{"enum":["condition"]},
{
"type":"object",
"properties": {
"type": {"$ref": "#/definitions/fieldType"},
"field": {"$ref": "#/definitions/fieldName"},
"values": {
"type": "array",
"items": {
"type": [
"integer",
"boolean",
"string"
]
},
"additionalItems": false,
"minItems": 1
},
"different": {
"type": "boolean"
},
"this": {
"type": "boolean"
}
},
"additionalItems": false,
"minItems": 1
},
"different": {
"type": "boolean"
},
"this": {
"type": "boolean"
"required":["type","field","values"],
"additionalProperties": false
}
},
"additionalProperties": false
],
"additionalItems": false
},
"array":{
"type":"array",
"items":[
{"enum":["array"]},
{
"oneOf":[
{
"type":"object",
"properties":{
"type": {"$ref": "#/definitions/fieldType"},
"countType": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false,
"required":["type","countType"]
},
{
"type":"object",
"properties":{
"type": {"$ref": "#/definitions/fieldType"},
"count": {"$ref": "#/definitions/fieldTypeArgsCount"}
},
"additionalProperties": false,
"required":["type","count"]
}
]
}
],
"additionalItems": false
},
"buffer":{
"type":"array",
"items":[
{"enum":["buffer"]},
{
"type": "object",
"properties": {
"countType": {"$ref": "#/definitions/fieldType"}
},
"additionalProperties": false,
"required": [
"countType"
]
}
]
},
"fieldTypeArgsCountFor": {

@@ -100,0 +164,0 @@ "type": "string",

@@ -94,13 +94,17 @@ {

"name": "publicKey",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "verifyToken",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{
"countType": "varint"
}
]
}

@@ -147,13 +151,17 @@ ]

"name": "sharedSecret",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "verifyToken",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{
"countType": "varint"
}
]
}

@@ -594,7 +602,9 @@ ]

"name": "entityIds",
"type": "array",
"typeArgs": {
"type": "varint",
"countType": "varint"
}
"type": [
"array",
{
"type": "varint",
"countType": "varint"
}
]
}

@@ -844,43 +854,47 @@ ]

"name": "properties",
"type": "array",
"typeArgs": {
"countType": "int",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "double"
},
{
"name": "modifiers",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "UUID",
"type": "UUID"
},
{
"name": "amount",
"type": "double"
},
{
"name": "operation",
"type": "byte"
}
]
}
"type": [
"array",
{
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "double"
},
{
"name": "modifiers",
"type": [
"array",
{
"type": [
"container",
[
{
"name": "UUID",
"type": "UUID"
},
{
"name": "amount",
"type": "double"
},
{
"name": "operation",
"type": "byte"
}
]
],
"countType": "varint"
}
]
}
}
]
]
],
"countType": "int"
}
}
]
}

@@ -910,6 +924,8 @@ ]

"name": "chunkData",
"type": "buffer",
"typeArgs": {
"countType": "varint"
}
"type": [
"buffer",
{
"countType": "varint"
}
]
}

@@ -931,23 +947,25 @@ ]

"name": "records",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "horizontalPos",
"type": "ubyte"
},
{
"name": "y",
"type": "ubyte"
},
{
"name": "blockId",
"type": "varint"
}
]
"type": [
"array",
{
"type": [
"container",
[
{
"name": "horizontalPos",
"type": "ubyte"
},
{
"name": "y",
"type": "ubyte"
},
{
"name": "blockId",
"type": "varint"
}
]
],
"countType": "varint"
}
}
]
}

@@ -1016,23 +1034,25 @@ ]

"name": "meta",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "x",
"type": "int"
},
{
"name": "z",
"type": "int"
},
{
"name": "bitMap",
"type": "ushort"
}
]
"type": [
"array",
{
"type": [
"container",
[
{
"name": "x",
"type": "int"
},
{
"name": "z",
"type": "int"
},
{
"name": "bitMap",
"type": "ushort"
}
]
],
"countType": "varint"
}
}
]
},

@@ -1066,23 +1086,25 @@ {

"name": "affectedBlockOffsets",
"type": "array",
"typeArgs": {
"countType": "int",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
},
{
"name": "z",
"type": "byte"
}
]
"type": [
"array",
{
"type": [
"container",
[
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
},
{
"name": "z",
"type": "byte"
}
]
],
"countType": "int"
}
}
]
},

@@ -1198,15 +1220,17 @@ {

"name": "data",
"type": "array",
"typeArgs": {
"count": {
"field": "particleId",
"map": {
"36": 2,
"37": 1,
"38": 1
"type": [
"array",
{
"count": {
"field": "particleId",
"map": {
"36": 2,
"37": 1,
"38": 1
},
"default": 0
},
"default": 0
},
"type": "varint"
}
"type": "varint"
}
]
}

@@ -1274,10 +1298,12 @@ ]

"name": "entityId",
"type": "condition",
"typeArgs": {
"field": "inventoryType",
"values": [
"EntityHorse"
],
"type": "int"
}
"type": [
"condition",
{
"type": "int",
"field": "inventoryType",
"values": [
"EntityHorse"
]
}
]
}

@@ -1321,7 +1347,9 @@ ]

"name": "items",
"type": "array",
"typeArgs": {
"type": "slot",
"countType": "short"
}
"type": [
"array",
{
"type": "slot",
"countType": "short"
}
]
}

@@ -1406,23 +1434,25 @@ ]

"name": "icons",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "directionAndType",
"type": "byte"
},
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
}
]
"type": [
"array",
{
"type": [
"container",
[
{
"name": "directionAndType",
"type": "byte"
},
{
"name": "x",
"type": "byte"
},
{
"name": "y",
"type": "byte"
}
]
],
"countType": "varint"
}
}
]
},

@@ -1435,50 +1465,60 @@ {

"name": "rows",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "x",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "y",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": "byte",
"field": "columns",
"values": [
0
],
"different": true
}
]
},
{
"name": "data",
"type": "condition",
"typeArgs": {
"type": "buffer",
"typeArgs": {
"countType": "varint"
},
"field": "columns",
"values": [
0
],
"different": true
}
"type": [
"condition",
{
"type": [
"buffer",
{
"countType": "varint"
}
],
"field": "columns",
"values": [
0
],
"different": true
}
]
}

@@ -1518,19 +1558,21 @@ ]

"name": "entries",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
]
"type": [
"array",
{
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
]
],
"countType": "varint"
}
}
]
}

@@ -1548,117 +1590,135 @@ ]

"name": "data",
"type": "array",
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
{
"name": "UUID",
"type": "UUID"
},
{
"name": "name",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0
"type": [
"array",
{
"type": [
"container",
[
{
"name": "UUID",
"type": "UUID"
},
{
"name": "name",
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0
]
}
]
}
},
{
"name": "properties",
"type": "condition",
"typeArgs": {
"type": "array",
"field": "action",
"values": [
0
],
"typeArgs": {
"countType": "varint",
"type": "container",
"typeArgs": {
"fields": [
},
{
"name": "properties",
"type": [
"condition",
{
"type": [
"array",
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "isSigned",
"type": "bool"
},
{
"name": "signature",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "isSigned",
"values": [
true
],
"this": true
}
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "isSigned",
"type": "bool"
},
{
"name": "signature",
"type": [
"condition",
{
"type": "string",
"field": "isSigned",
"values": [
true
],
"this": true
}
]
}
]
],
"countType": "varint"
}
],
"field": "action",
"values": [
0
]
}
}
}
},
{
"name": "gamemode",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
1
]
}
},
{
"name": "ping",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
2
},
{
"name": "gamemode",
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
1
]
}
]
}
},
{
"name": "hasDisplayName",
"type": "condition",
"typeArgs": {
"type": "bool",
"field": "action",
"values": [
0,
3
},
{
"name": "ping",
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
2
]
}
]
}
},
{
"name": "displayName",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "hasDisplayName",
"this": true,
"values": [
true
},
{
"name": "hasDisplayName",
"type": [
"condition",
{
"type": "bool",
"field": "action",
"values": [
0,
3
]
}
]
},
{
"name": "displayName",
"type": [
"condition",
{
"type": "string",
"field": "hasDisplayName",
"values": [
true
],
"this": true
}
]
}
}
]
]
],
"countType": "varint"
}
}
]
}

@@ -1689,7 +1749,9 @@ ]

"name": "matches",
"type": "array",
"typeArgs": {
"type": "string",
"countType": "varint"
}
"type": [
"array",
{
"type": "string",
"countType": "varint"
}
]
}

@@ -1711,23 +1773,27 @@ ]

"name": "displayText",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
2
]
}
]
},
{
"name": "type",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
2
]
}
]
}

@@ -1753,11 +1819,13 @@ ]

"name": "value",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
1
],
"different": true
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
1
],
"different": true
}
]
}

@@ -1792,88 +1860,104 @@ ]

"name": "name",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "prefix",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "suffix",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "friendlyFire",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "nameTagVisibility",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "color",
"type": "condition",
"typeArgs": {
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "byte",
"field": "mode",
"values": [
0,
2
]
}
]
},
{
"name": "players",
"type": "condition",
"typeArgs": {
"type": "array",
"field": "mode",
"values": [
0,
3,
4
],
"typeArgs": {
"type": "string",
"countType": "varint"
"type": [
"condition",
{
"type": [
"array",
{
"type": "string",
"countType": "varint"
}
],
"field": "mode",
"values": [
0,
3,
4
]
}
}
]
}

@@ -1922,44 +2006,52 @@ ]

"name": "duration",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "event",
"values": [
1
]
}
"type": [
"condition",
{
"type": "varint",
"field": "event",
"values": [
1
]
}
]
},
{
"name": "playerId",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "event",
"values": [
2
]
}
"type": [
"condition",
{
"type": "varint",
"field": "event",
"values": [
2
]
}
]
},
{
"name": "entityId",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "event",
"values": [
1,
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "event",
"values": [
1,
2
]
}
]
},
{
"name": "message",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "event",
"values": [
2
]
}
"type": [
"condition",
{
"type": "string",
"field": "event",
"values": [
2
]
}
]
}

@@ -1986,105 +2078,123 @@ ]

"name": "radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
0
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
0
]
}
]
},
{
"name": "x",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
2,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
2,
3
]
}
]
},
{
"name": "z",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
2,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
2,
3
]
}
]
},
{
"name": "old_radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "new_radius",
"type": "condition",
"typeArgs": {
"type": "double",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "double",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "speed",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
1,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
1,
3
]
}
]
},
{
"name": "portalBoundary",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
3
]
}
]
},
{
"name": "warning_time",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
4,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
4,
3
]
}
]
},
{
"name": "warning_blocks",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
5,
3
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
5,
3
]
}
]
}

@@ -2102,44 +2212,52 @@ ]

"name": "text",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
1
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
1
]
}
]
},
{
"name": "fadeIn",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
},
{
"name": "stay",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
},
{
"name": "fadeOut",
"type": "condition",
"typeArgs": {
"type": "int",
"field": "action",
"values": [
2
]
}
"type": [
"condition",
{
"type": "int",
"field": "action",
"values": [
2
]
}
]
}

@@ -2196,59 +2314,69 @@ ]

"name": "title",
"type": "condition",
"typeArgs": {
"type": "string",
"field": "action",
"values": [
0,
3
]
}
"type": [
"condition",
{
"type": "string",
"field": "action",
"values": [
0,
3
]
}
]
},
{
"name": "health",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "action",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "action",
"values": [
0,
2
]
}
]
},
{
"name": "color",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
4
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
4
]
}
]
},
{
"name": "dividers",
"type": "condition",
"typeArgs": {
"type": "varint",
"field": "action",
"values": [
0,
4
]
}
"type": [
"condition",
{
"type": "varint",
"field": "action",
"values": [
0,
4
]
}
]
},
{
"name": "flags",
"type": "condition",
"typeArgs": {
"type": "ubyte",
"field": "action",
"values": [
0,
5
]
}
"type": [
"condition",
{
"type": "ubyte",
"field": "action",
"values": [
0,
5
]
}
]
}

@@ -2290,44 +2418,52 @@ ]

"name": "x",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
},
{
"name": "y",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
},
{
"name": "z",
"type": "condition",
"typeArgs": {
"type": "float",
"field": "mouse",
"values": [
2
]
}
"type": [
"condition",
{
"type": "float",
"field": "mouse",
"values": [
2
]
}
]
},
{
"name": "hand",
"type": "condition",
"typeArgs": {
"type":"varint",
"field": "mouse",
"values": [
0,
2
]
}
"type": [
"condition",
{
"type": "varint",
"field": "mouse",
"values": [
0,
2
]
}
]
}

@@ -2434,3 +2570,3 @@ ]

"name": "hand",
"type":"varint"
"type": "varint"
}

@@ -2656,10 +2792,12 @@ ]

"name": "block",
"type": "condition",
"typeArgs": {
"type": "position",
"field": "hasPosition",
"values": [
true
]
}
"type": [
"condition",
{
"type": "position",
"field": "hasPosition",
"values": [
true
]
}
]
}

@@ -2692,4 +2830,4 @@ ]

{
"name":"mainHand",
"type":"varint"
"name": "mainHand",
"type": "varint"
}

@@ -2744,2 +2882,2 @@ ]

}
}
}

@@ -8,10 +8,20 @@ # minecraft-data

## Wrappers
Minecraft-data is language independent, you can use it with these language specific modules :
* [node-minecraft-data](https://github.com/PrismarineJS/node-minecraft-data) provides indexes and look up functions in node.js
* [python-minecraft-data](https://github.com/rom1504/python-minecraft-data) provides indexes and look up functions in python
If you want to use minecraft-data in a new language, we advise you to [create a new wrapper](doc/make-a-new-wrapper.md)
There are also some projects that wrap parts of minecraft-data in other ways :
* [ProtocolGen](https://github.com/Johni0702/ProtocolGen) that generate java files reading and writing the protocol
from minecraft-data protocol.json file
## Documentation
* See [doc/history.md](doc/history.md)
* [Documentation generated using the json schemas and docson](http://prismarinejs.github.io/minecraft-data/)
* [Documentation generated using the json schemas and docson](http://prismarinejs.github.io/minecraft-data/?v=1.9)
* [Textual documentation of the recipe format](doc/recipes.md)

@@ -18,0 +28,0 @@

{
"name": "minecraft-data",
"version": "0.5.2",
"version": "0.6.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 not supported yet

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