minecraft-data
Version:
Provide easy access to minecraft data in node.js
1,787 lines (1,786 loc) • 198 kB
JSON
{
"types": {
"varint": "native",
"varlong": "native",
"optvarint": "varint",
"pstring": "native",
"buffer": "native",
"u8": "native",
"u16": "native",
"u32": "native",
"u64": "native",
"i8": "native",
"i16": "native",
"i32": "native",
"i64": "native",
"bool": "native",
"f32": "native",
"f64": "native",
"UUID": "native",
"option": "native",
"entityMetadataLoop": "native",
"topBitSetTerminatedArray": "native",
"bitfield": "native",
"container": "native",
"switch": "native",
"void": "native",
"array": "native",
"restBuffer": "native",
"anonymousNbt": "native",
"anonOptionalNbt": "native",
"string": [
"pstring",
{
"countType": "varint"
}
],
"vec3f": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
}
]
],
"vec4f": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "w",
"type": "f32"
}
]
],
"vec3f64": [
"container",
[
{
"name": "x",
"type": "f64"
},
{
"name": "y",
"type": "f64"
},
{
"name": "z",
"type": "f64"
}
]
],
"slot": [
"container",
[
{
"name": "present",
"type": "bool"
},
{
"anon": true,
"type": [
"switch",
{
"compareTo": "present",
"fields": {
"false": "void",
"true": [
"container",
[
{
"name": "itemId",
"type": "varint"
},
{
"name": "itemCount",
"type": "i8"
},
{
"name": "nbtData",
"type": "anonOptionalNbt"
}
]
]
}
}
]
}
]
],
"particle": [
"container",
[
{
"name": "particleId",
"type": "varint"
},
{
"name": "data",
"type": [
"particleData",
{
"compareTo": "particleId"
}
]
}
]
],
"particleData": [
"switch",
{
"compareTo": "$compareTo",
"fields": {
"2": [
"container",
[
{
"name": "blockState",
"type": "varint"
}
]
],
"3": [
"container",
[
{
"name": "blockState",
"type": "varint"
}
]
],
"14": [
"container",
[
{
"name": "red",
"type": "f32"
},
{
"name": "green",
"type": "f32"
},
{
"name": "blue",
"type": "f32"
},
{
"name": "scale",
"type": "f32"
}
]
],
"15": [
"container",
[
{
"name": "fromRed",
"type": "f32"
},
{
"name": "fromGreen",
"type": "f32"
},
{
"name": "fromBlue",
"type": "f32"
},
{
"name": "scale",
"type": "f32"
},
{
"name": "toRed",
"type": "f32"
},
{
"name": "toGreen",
"type": "f32"
},
{
"name": "toBlue",
"type": "f32"
}
]
],
"25": [
"container",
[
{
"name": "blockState",
"type": "varint"
}
]
],
"31": [
"container",
[
{
"name": "rotation",
"type": "f32"
}
]
],
"40": [
"container",
[
{
"name": "item",
"type": "slot"
}
]
],
"41": [
"container",
[
{
"name": "positionType",
"type": "string"
},
{
"name": "entityId",
"type": [
"switch",
{
"compareTo": "positionType",
"fields": {
"minecraft:entity": "varint"
},
"default": "void"
}
]
},
{
"name": "entityEyeHeight",
"type": [
"switch",
{
"compareTo": "positionType",
"fields": {
"minecraft:entity": "varint"
},
"default": "void"
}
]
},
{
"name": "destination",
"type": [
"switch",
{
"compareTo": "positionType",
"fields": {
"minecraft:block": "position",
"minecraft:entity": "varint"
}
}
]
},
{
"name": "ticks",
"type": "varint"
}
]
],
"93": [
"container",
[
{
"name": "delayInTicksBeforeShown",
"type": "varint"
}
]
]
},
"default": "void"
}
],
"ingredient": [
"array",
{
"countType": "varint",
"type": "slot"
}
],
"position": [
"bitfield",
[
{
"name": "x",
"size": 26,
"signed": true
},
{
"name": "z",
"size": 26,
"signed": true
},
{
"name": "y",
"size": 12,
"signed": true
}
]
],
"soundSource": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "master",
"1": "music",
"2": "record",
"3": "weather",
"4": "block",
"5": "hostile",
"6": "neutral",
"7": "player",
"8": "ambient",
"9": "voice"
}
}
],
"packedChunkPos": [
"container",
[
{
"name": "z",
"type": "i32"
},
{
"name": "x",
"type": "i32"
}
]
],
"previousMessages": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "id",
"type": "varint"
},
{
"name": "signature",
"type": [
"switch",
{
"compareTo": "id",
"fields": {
"0": [
"buffer",
{
"count": 256
}
]
},
"default": "void"
}
]
}
]
]
}
],
"entityMetadataItem": [
"switch",
{
"compareTo": "$compareTo",
"fields": {
"byte": "i8",
"int": "varint",
"long": "varlong",
"float": "f32",
"string": "string",
"component": "string",
"optional_component": [
"option",
"string"
],
"item_stack": "slot",
"boolean": "bool",
"rotations": [
"container",
[
{
"name": "pitch",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "roll",
"type": "f32"
}
]
],
"block_pos": "position",
"optional_block_pos": [
"option",
"position"
],
"direction": "varint",
"optional_uuid": [
"option",
"UUID"
],
"block_state": "varint",
"optional_block_state": "optvarint",
"compound_tag": "anonymousNbt",
"particle": "particle",
"villager_data": [
"container",
[
{
"name": "villagerType",
"type": "varint"
},
{
"name": "villagerProfession",
"type": "varint"
},
{
"name": "level",
"type": "varint"
}
]
],
"optional_unsigned_int": "optvarint",
"pose": "varint",
"cat_variant": "varint",
"frog_variant": "varint",
"optional_global_pos": [
"option",
"string"
],
"painting_variant": "varint",
"sniffer_state": "varint",
"vector3": "vec3f",
"quaternion": "vec4f"
}
}
],
"entityMetadata": [
"entityMetadataLoop",
{
"endVal": 255,
"type": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "byte",
"1": "int",
"2": "long",
"3": "float",
"4": "string",
"5": "component",
"6": "optional_component",
"7": "item_stack",
"8": "boolean",
"9": "rotations",
"10": "block_pos",
"11": "optional_block_pos",
"12": "direction",
"13": "optional_uuid",
"14": "block_state",
"15": "optional_block_state",
"16": "compound_tag",
"17": "particle",
"18": "villager_data",
"19": "optional_unsigned_int",
"20": "pose",
"21": "cat_variant",
"22": "frog_variant",
"23": "optional_global_pos",
"24": "painting_variant",
"25": "sniffer_state",
"26": "vector3",
"27": "quaternion"
}
}
]
},
{
"name": "value",
"type": [
"entityMetadataItem",
{
"compareTo": "type"
}
]
}
]
]
}
],
"minecraft_simple_recipe_format": [
"container",
[
{
"name": "category",
"type": "varint"
}
]
],
"minecraft_smelting_format": [
"container",
[
{
"name": "group",
"type": "string"
},
{
"name": "category",
"type": "varint"
},
{
"name": "ingredient",
"type": "ingredient"
},
{
"name": "result",
"type": "slot"
},
{
"name": "experience",
"type": "f32"
},
{
"name": "cookTime",
"type": "varint"
}
]
],
"tags": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "tagName",
"type": "string"
},
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": "varint"
}
]
}
]
]
}
],
"chunkBlockEntity": [
"container",
[
{
"anon": true,
"type": [
"bitfield",
[
{
"name": "x",
"size": 4,
"signed": false
},
{
"name": "z",
"size": 4,
"signed": false
}
]
]
},
{
"name": "y",
"type": "i16"
},
{
"name": "type",
"type": "varint"
},
{
"name": "nbtData",
"type": "anonOptionalNbt"
}
]
],
"chat_session": [
"option",
[
"container",
[
{
"name": "uuid",
"type": "UUID"
},
{
"name": "publicKey",
"type": [
"container",
[
{
"name": "expireTime",
"type": "i64"
},
{
"name": "keyBytes",
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "keySignature",
"type": [
"buffer",
{
"countType": "varint"
}
]
}
]
]
}
]
]
],
"game_profile": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "properties",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "signature",
"type": [
"option",
"string"
]
}
]
]
}
]
}
]
],
"command_node": [
"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": [
"container",
[
{
"name": "name",
"type": "string"
}
]
],
"2": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "parser",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "brigadier:bool",
"1": "brigadier:float",
"2": "brigadier:double",
"3": "brigadier:integer",
"4": "brigadier:long",
"5": "brigadier:string",
"6": "minecraft:entity",
"7": "minecraft:game_profile",
"8": "minecraft:block_pos",
"9": "minecraft:column_pos",
"10": "minecraft:vec3",
"11": "minecraft:vec2",
"12": "minecraft:block_state",
"13": "minecraft:block_predicate",
"14": "minecraft:item_stack",
"15": "minecraft:item_predicate",
"16": "minecraft:color",
"17": "minecraft:component",
"18": "minecraft:message",
"19": "minecraft:nbt",
"20": "minecraft:nbt_tag",
"21": "minecraft:nbt_path",
"22": "minecraft:objective",
"23": "minecraft:objective_criteria",
"24": "minecraft:operation",
"25": "minecraft:particle",
"26": "minecraft:angle",
"27": "minecraft:rotation",
"28": "minecraft:scoreboard_slot",
"29": "minecraft:score_holder",
"30": "minecraft:swizzle",
"31": "minecraft:team",
"32": "minecraft:item_slot",
"33": "minecraft:resource_location",
"34": "minecraft:function",
"35": "minecraft:entity_anchor",
"36": "minecraft:int_range",
"37": "minecraft:float_range",
"38": "minecraft:dimension",
"39": "minecraft:gamemode",
"40": "minecraft:time",
"41": "minecraft:resource_or_tag",
"42": "minecraft:resource_or_tag_key",
"43": "minecraft:resource",
"44": "minecraft:resource_key",
"45": "minecraft:template_mirror",
"46": "minecraft:template_rotation",
"47": "minecraft:heightmap",
"48": "minecraft:uuid"
}
}
]
},
{
"name": "properties",
"type": [
"switch",
{
"compareTo": "parser",
"fields": {
"brigadier:bool": "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: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: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": [
"mapper",
{
"type": "varint",
"mappings": {
"0": "SINGLE_WORD",
"1": "QUOTABLE_PHRASE",
"2": "GREEDY_PHRASE"
}
}
],
"minecraft:entity": [
"bitfield",
[
{
"name": "unused",
"size": 6,
"signed": false
},
{
"name": "onlyAllowPlayers",
"size": 1,
"signed": false
},
{
"name": "onlyAllowEntities",
"size": 1,
"signed": false
}
]
],
"minecraft:game_profile": "void",
"minecraft:block_pos": "void",
"minecraft:column_pos": "void",
"minecraft:vec3": "void",
"minecraft:vec2": "void",
"minecraft:block_state": "void",
"minecraft:block_predicate": "void",
"minecraft:item_stack": "void",
"minecraft:item_predicate": "void",
"minecraft:color": "void",
"minecraft:component": "void",
"minecraft:message": "void",
"minecraft:nbt": "void",
"minecraft:nbt_path": "void",
"minecraft:objective": "void",
"minecraft:objective_criteria": "void",
"minecraft:operation": "void",
"minecraft:particle": "void",
"minecraft:angle": "void",
"minecraft:rotation": "void",
"minecraft:scoreboard_slot": "void",
"minecraft:score_holder": [
"bitfield",
[
{
"name": "unused",
"size": 7,
"signed": false
},
{
"name": "allowMultiple",
"size": 1,
"signed": false
}
]
],
"minecraft:swizzle": "void",
"minecraft:team": "void",
"minecraft:item_slot": "void",
"minecraft:resource_location": "void",
"minecraft:function": "void",
"minecraft:entity_anchor": "void",
"minecraft:int_range": "void",
"minecraft:float_range": "void",
"minecraft:dimension": "void",
"minecraft:gamemode": "void",
"minecraft:time": [
"container",
[
{
"name": "min",
"type": "i32"
}
]
],
"minecraft:resource_or_tag": [
"container",
[
{
"name": "registry",
"type": "string"
}
]
],
"minecraft:resource_or_tag_key": [
"container",
[
{
"name": "registry",
"type": "string"
}
]
],
"minecraft:resource": [
"container",
[
{
"name": "registry",
"type": "string"
}
]
],
"minecraft:resource_key": [
"container",
[
{
"name": "registry",
"type": "string"
}
]
],
"minecraft:template_mirror": "void",
"minecraft:template_rotation": "void",
"minecraft:heightmap": "void",
"minecraft:uuid": "void"
}
}
]
},
{
"name": "suggestionType",
"type": [
"switch",
{
"compareTo": "../flags/has_custom_suggestions",
"fields": {
"1": "string"
},
"default": "void"
}
]
}
]
]
}
}
]
}
]
]
},
"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": "UUID"
},
{
"name": "username",
"type": "string"
},
{
"name": "properties",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "string"
},
{
"name": "signature",
"type": [
"option",
"string"
]
}
]
]
}
]
}
]
],
"packet_compress": [
"container",
[
{
"name": "threshold",
"type": "varint"
}
]
],
"packet_login_plugin_request": [
"container",
[
{
"name": "messageId",
"type": "varint"
},
{
"name": "channel",
"type": "string"
},
{
"name": "data",
"type": "restBuffer"
}
]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "disconnect",
"0x01": "encryption_begin",
"0x02": "success",
"0x03": "compress",
"0x04": "login_plugin_request"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"disconnect": "packet_disconnect",
"encryption_begin": "packet_encryption_begin",
"success": "packet_success",
"compress": "packet_compress",
"login_plugin_request": "packet_login_plugin_request"
}
}
]
}
]
]
}
},
"toServer": {
"types": {
"packet_login_start": [
"container",
[
{
"name": "username",
"type": "string"
},
{
"name": "playerUUID",
"type": "UUID"
}
]
],
"packet_encryption_begin": [
"container",
[
{
"name": "sharedSecret",
"type": [
"buffer",
{
"countType": "varint"
}
]
},
{
"name": "verifyToken",
"type": [
"buffer",
{
"countType": "varint"
}
]
}
]
],
"packet_login_plugin_response": [
"container",
[
{
"name": "messageId",
"type": "varint"
},
{
"name": "data",
"type": [
"option",
"restBuffer"
]
}
]
],
"packet_login_acknowledged": [
"container",
[]
],
"packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "varint",
"mappings": {
"0x00": "login_start",
"0x01": "encryption_begin",
"0x02": "login_plugin_response",
"0x03": "login_acknowledged"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"login_start": "packet_login_start",
"encryption_begin": "packet_encryption_begin",
"login_plugin_response": "packet_login_plugin_response",
"login_acknowledged": "packet_login_acknowledged"
}
}
]
}
]
]
}
}
},
"configuration": {
"toClient": {
"types": {
"packet_custom_payload": [
"container",
[
{
"name": "channel",
"type": "string"
},
{
"name": "data",
"type": "restBuffer"
}
]
],
"packet_disconnect": [
"container",
[
{
"name": "reason",
"type": "string"
}
]
],
"packet_finish_configuration": [
"container",
[]
],
"packet_keep_alive": [
"container",
[
{
"name": "keepAliveId",
"type": "i64"
}
]
],
"packet_ping": [
"container",
[
{
"name": "id",
"type": "i32"
}
]
],
"packet_registry_data": [
"container",
[
{
"name": "codec",
"type": "anonymousNbt"
}
]
],
"packet_resource_pack_send": [
"container",
[
{
"name": "url",
"type": "string"
},
{
"name": "hash",
"type": "string"
},
{
"name": "forced",
"type": "bool"
},
{
"name": "promptMessage",
"type": [
"option",
"string"
]
}
]
],
"packet_feature_flags": [
"container",
[
{
"name": "features",
"type": [
"array",
{
"countType": "varint",
"type": "string"
}
]
}
]
],
"packet_tags": [
"container",
[