minecraft-data
Version:
Provide easy access to minecraft data in node.js
1,642 lines (1,641 loc) • 127 kB
JSON
{
"types": {
"varint": "native",
"varlong": "native",
"pstring": "native",
"u16": "native",
"u8": "native",
"i64": "native",
"buffer": "native",
"i32": "native",
"i8": "native",
"bool": "native",
"i16": "native",
"f32": "native",
"f64": "native",
"UUID": "native",
"option": "native",
"entityMetadataLoop": "native",
"bitfield": "native",
"container": "native",
"switch": "native",
"void": "native",
"array": "native",
"restBuffer": "native",
"nbt": "native",
"optionalNbt": "native",
"string": [
"pstring",
{
"countType": "varint"
}
],
"slot": [
"container",
[
{
"name": "blockId",
"type": "i16"
},
{
"anon": true,
"type": [
"switch",
{
"compareTo": "blockId",
"fields": {
"-1": "void"
},
"default": [
"container",
[
{
"name": "itemCount",
"type": "i8"
},
{
"name": "nbtData",
"type": "optionalNbt"
}
]
]
}
]
}
]
],
"position": [
"bitfield",
[
{
"name": "x",
"size": 26,
"signed": true
},
{
"name": "y",
"size": 12,
"signed": true
},
{
"name": "z",
"size": 26,
"signed": true
}
]
],
"entityMetadataItem": [
"switch",
{
"compareTo": "$compareTo",
"fields": {
"0": "i8",
"1": "varint",
"2": "f32",
"3": "string",
"4": "string",
"5": "slot",
"6": "bool",
"7": [
"container",
[
{
"name": "pitch",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "roll",
"type": "f32"
}
]
],
"8": "position",
"9": [
"option",
"position"
],
"10": "varint",
"11": [
"option",
"UUID"
],
"12": "varint",
"13": "nbt"
}
}
],
"entityMetadata": [
"entityMetadataLoop",
{
"endVal": 255,
"type": [
"container",
[
{
"anon": true,
"type": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": "i8"
}
]
]
},
{
"name": "value",
"type": [
"entityMetadataItem",
{
"compareTo": "type"
}
]
}
]
]
}
]
},
"handshaking": {
"toClient": {
"types": {
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {}
}
]
}
]
]
}
},
"toServer": {
"types": {
"packet_set_protocol": [
"container",
[
{
"name": "protocolVersion",
"type": "varint"
},
{
"name": "serverHost",
"type": "string"
},
{
"name": "serverPort",
"type": "u16"
},
{
"name": "nextState",
"type": "varint"
}
]
],
"packet_legacy_server_list_ping": [
"container",
[
{
"name": "payload",
"type": "u8"
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "set_protocol",
"0xfe": "legacy_server_list_ping"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"set_protocol": "packet_set_protocol",
"legacy_server_list_ping": "packet_legacy_server_list_ping"
}
}
]
}
]
]
}
}
},
"status": {
"toClient": {
"types": {
"packet_server_info": [
"container",
[
{
"name": "response",
"type": "string"
}
]
],
"packet_ping": [
"container",
[
{
"name": "time",
"type": "i64"
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "server_info",
"0x01": "ping"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"server_info": "packet_server_info",
"ping": "packet_ping"
}
}
]
}
]
]
}
},
"toServer": {
"types": {
"packet_ping_start": [
"container",
[]
],
"packet_ping": [
"container",
[
{
"name": "time",
"type": "i64"
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "ping_start",
"0x01": "ping"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"ping_start": "packet_ping_start",
"ping": "packet_ping"
}
}
]
}
]
]
}
}
},
"login": {
"toClient": {
"types": {
"packet_disconnect": [
"container",
[
{
"name": "reason",
"type": "string"
}
]
],
"packet_encryption_begin": [
"container",
[
{
"name": "serverId",
"type": "string"
},
{
"name": "publicKey",
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "verifyToken",
"type": [
"buffer",
{
"countType": "varint"
}
]
}
]
],
"packet_success": [
"container",
[
{
"name": "uuid",
"type": "string"
},
{
"name": "username",
"type": "string"
}
]
],
"packet_compress": [
"container",
[
{
"name": "threshold",
"type": "varint"
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "disconnect",
"0x01": "encryption_begin",
"0x02": "success",
"0x03": "compress"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"disconnect": "packet_disconnect",
"encryption_begin": "packet_encryption_begin",
"success": "packet_success",
"compress": "packet_compress"
}
}
]
}
]
]
}
},
"toServer": {
"types": {
"packet_login_start": [
"container",
[
{
"name": "username",
"type": "string"
}
]
],
"packet_encryption_begin": [
"container",
[
{
"name": "sharedSecret",
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "verifyToken",
"type": [
"buffer",
{
"countType": "varint"
}
]
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "login_start",
"0x01": "encryption_begin"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"login_start": "packet_login_start",
"encryption_begin": "packet_encryption_begin"
}
}
]
}
]
]
}
}
},
"play": {
"toClient": {
"types": {
"packet_spawn_entity": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "objectUUID",
"type": "UUID"
},
{
"name": "type",
"type": "i8"
},
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
},
{
"name": "pitch",
"type": "i8"
},
{
"name": "yaw",
"type": "i8"
},
{
"name": "objectData",
"type": "i32"
},
{
"name": "velocityX",
"type": "i16"
},
{
"name": "velocityY",
"type": "i16"
},
{
"name": "velocityZ",
"type": "i16"
}
]
],
"packet_spawn_entity_experience_orb": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
},
{
"name": "count",
"type": "i16"
}
]
],
"packet_spawn_entity_weather": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "type",
"type": "i8"
},
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
}
]
],
"packet_spawn_entity_living": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "entityUUID",
"type": "UUID"
},
{
"name": "type",
"type": "varint"
},
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
},
{
"name": "yaw",
"type": "i8"
},
{
"name": "pitch",
"type": "i8"
},
{
"name": "headPitch",
"type": "i8"
},
{
"name": "velocityX",
"type": "i16"
},
{
"name": "velocityY",
"type": "i16"
},
{
"name": "velocityZ",
"type": "i16"
},
{
"name": "metadata",
"type": "entityMetadata"
}
]
],
"packet_spawn_entity_painting": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "entityUUID",
"type": "UUID"
},
{
"name": "title",
"type": "string"
},
{
"name": "location",
"type": "position"
},
{
"name": "direction",
"type": "u8"
}
]
],
"packet_named_entity_spawn": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "playerUUID",
"type": "UUID"
},
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
},
{
"name": "yaw",
"type": "i8"
},
{
"name": "pitch",
"type": "i8"
},
{
"name": "metadata",
"type": "entityMetadata"
}
]
],
"packet_animation": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "animation",
"type": "u8"
}
]
],
"packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "unknown1",
"type": "varint"
},
{
"name": "unknown2",
"type": "varint"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]
}
]
],
"packet_advancements": [
"container",
[
{
"name": "reset",
"type": "bool"
},
{
"name": "advancementMapping",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": [
"container",
[
{
"name": "parentId",
"type": [
"option",
"string"
]
},
{
"name": "displayData",
"type": [
"option",
[
"container",
[
{
"name": "title",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "icon",
"type": "slot"
},
{
"name": "frameType",
"type": "varint"
},
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "_unused",
"size": 29,
"signed": false
},
{
"name": "hidden",
"size": 1,
"signed": false
},
{
"name": "show_toast",
"size": 1,
"signed": false
},
{
"name": "has_background_texture",
"size": 1,
"signed": false
}
]
]
},
{
"name": "backgroundTexture",
"type": [
"switch",
{
"compareTo": "flags/has_background_texture",
"fields": {
"1": "string"
},
"default": "void"
}
]
},
{
"name": "xCord",
"type": "f32"
},
{
"name": "yCord",
"type": "f32"
}
]
]
]
},
{
"name": "criteria",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "void"
}
]
]
}
]
},
{
"name": "requirements",
"type": [
"array",
{
"countType": "varint",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
}
]
}
]
]
}
]
]
}
]
},
{
"name": "identifiers",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
},
{
"name": "progressMapping",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "criterionIdentifier",
"type": "string"
},
{
"name": "criterionProgress",
"type": [
"option",
"i64"
]
}
]
]
}
]
}
]
]
}
]
}
]
],
"packet_block_break_animation": [
"container",
[
{
"name": "entityId",
"type": "varint"
},
{
"name": "location",
"type": "position"
},
{
"name": "destroyStage",
"type": "i8"
}
]
],
"packet_tile_entity_data": [
"container",
[
{
"name": "location",
"type": "position"
},
{
"name": "action",
"type": "u8"
},
{
"name": "nbtData",
"type": "optionalNbt"
}
]
],
"packet_block_action": [
"container",
[
{
"name": "location",
"type": "position"
},
{
"name": "byte1",
"type": "u8"
},
{
"name": "byte2",
"type": "u8"
},
{
"name": "blockId",
"type": "varint"
}
]
],
"packet_block_change": [
"container",
[
{
"name": "location",
"type": "position"
},
{
"name": "type",
"type": "varint"
}
]
],
"packet_boss_bar": [
"container",
[
{
"name": "entityUUID",
"type": "UUID"
},
{
"name": "action",
"type": "varint"
},
{
"name": "title",
"type": [
"switch",
{
"compareTo": "action",
"fields": {
"0": "string",
"3": "string"
},
"default": "void"
}
]
},
{
"name": "health",
"type": [
"switch",
{
"compareTo": "action",
"fields": {
"0": "f32",
"2": "f32"
},
"default": "void"
}
]
},
{
"name": "color",
"type": [
"switch",
{
"compareTo": "action",
"fields": {
"0": "varint",
"4": "varint"
},
"default": "void"
}
]
},
{
"name": "dividers",
"type": [
"switch",
{
"compareTo": "action",
"fields": {
"0": "varint",
"4": "varint"
},
"default": "void"
}
]
},
{
"name": "flags",
"type": [
"switch",
{
"compareTo": "action",
"fields": {
"0": "u8",
"5": "u8"
},
"default": "void"
}
]
}
]
],
"packet_difficulty": [
"container",
[
{
"name": "difficulty",
"type": "u8"
}
]
],
"packet_tab_complete": [
"container",
[
{
"name": "transactionId",
"type": "varint"
},
{
"name": "start",
"type": "varint"
},
{
"name": "length",
"type": "varint"
},
{
"name": "matches",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
}
]
],
"packet_declare_commands": [
"container",
[
{
"name": "nodes",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 3,
"signed": false
},
{
"name": "has_custom_suggestions",
"size": 1,
"signed": false
},
{
"name": "has_redirect_node",
"size": 1,
"signed": false
},
{
"name": "has_command",
"size": 1,
"signed": false
},
{
"name": "command_node_type",
"size": 2,
"signed": false
}
]
]
},
{
"name": "children",
"type": [
"array",
{
"countType": "varint",
"type": "varint"
}
]
},
{
"name": "redirectNode",
"type": [
"switch",
{
"compareTo": "flags/has_redirect_node",
"fields": {
"1": "varint"
},
"default": "void"
}
]
},
{
"name": "extraNodeData",
"type": [
"switch",
{
"compareTo": "flags/command_node_type",
"fields": {
"0": "void",
"1": "string",
"2": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "parser",
"type": "string"
},
{
"name": "properties",
"type": [
"switch",
{
"compareTo": "parser",
"fields": {
"brigadier:double": [
"container",
[
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
},
{
"name": "min",
"type": [
"switch",
{
"compareTo": "flags/min_present",
"fields": {
"1": "f64"
},
"default": "void"
}
]
},
{
"name": "max",
"type": [
"switch",
{
"compareTo": "flags/max_present",
"fields": {
"1": "f64"
},
"default": "void"
}
]
}
]
],
"brigadier:float": [
"container",
[
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
},
{
"name": "min",
"type": [
"switch",
{
"compareTo": "flags/min_present",
"fields": {
"1": "f32"
},
"default": "void"
}
]
},
{
"name": "max",
"type": [
"switch",
{
"compareTo": "flags/max_present",
"fields": {
"1": "f32"
},
"default": "void"
}
]
}
]
],
"brigadier:integer": [
"container",
[
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
},
{
"name": "min",
"type": [
"switch",
{
"compareTo": "flags/min_present",
"fields": {
"1": "i32"
},
"default": "void"
}
]
},
{
"name": "max",
"type": [
"switch",
{
"compareTo": "flags/max_present",
"fields": {
"1": "i32"
},
"default": "void"
}
]
}
]
],
"brigadier:long": [
"container",
[
{
"name": "flags",
"type": [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "max_present",
"size": 1,
"signed": false
},
{
"name": "min_present",
"size": 1,
"signed": false
}
]
]
},
{
"name": "min",
"type": [
"switch",
{
"compareTo": "flags/min_present",
"fields": {
"1": "i64"
},
"default": "void"
}
]
},
{
"name": "max",
"type": [
"switch",
{
"compareTo": "flags/max_present",
"fields": {
"1": "i64"
},
"default": "void"
}
]
}
]
],
"brigadier:string": "varint",
"minecraft:entity": "i8",
"minecraft:score_holder": "i8",
"minecraft:range": "bool"
},
"default": "void"
}
]
},
{
"name": "suggests",
"type": [
"switch",
{
"compareTo": "../flags/has_custom_suggestions",
"fields": {
"1": "string"
},
"default": "void"
}
]
}
]
]
}
}
]
}
]
]
}
]
},
{
"name": "rootIndex",
"type": "varint"
}
]
],
"packet_chat": [
"container",
[
{
"name": "message",
"type": "string"
},
{
"name": "position",
"type": "i8"
}
]
],
"packet_multi_block_change": [
"container",
[
{
"name": "chunkX",
"type": "i32"
},
{
"name": "chunkZ",
"type": "i32"
},
{
"name": "records",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "horizontalPos",
"type": "u8"
},
{
"name": "y",
"type": "u8"
},
{
"name": "blockId",
"type": "varint"
}
]
]
}
]
}
]
],
"packet_transaction": [
"container",
[
{
"name": "windowId",
"type": "i8"
},
{
"name": "action",
"type": "i16"
},
{
"name": "accepted",
"type": "bool"
}
]
],
"packet_close_window": [
"container",
[
{
"name": "windowId",
"type": "u8"
}
]
],
"packet_open_window": [
"container",
[
{
"name": "windowId",
"type": "u8"
},
{
"name": "inventoryType",
"type": "string"
},
{
"name": "windowTitle",
"type": "string"
},
{