UNPKG

minecraft-data

Version:
1,739 lines 149 kB
{ "types": { "varint": "native", "varlong": "native", "optvarint": "varint", "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", "topBitSetTerminatedArray": "native", "bitfield": "native", "container": "native", "switch": "native", "void": "native", "array": "native", "restBuffer": "native", "nbt": "native", "optionalNbt": "native", "string": [ "pstring", { "countType": "varint" } ], "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": "optionalNbt" } ] ] } } ] } ] ], "particle": [ "container", [ { "name": "particleId", "type": "varint" }, { "name": "data", "type": [ "particleData", { "compareTo": "particleId" } ] } ] ], "particleData": [ "switch", { "compareTo": "$compareTo", "fields": { "3": [ "container", [ { "name": "blockState", "type": "varint" } ] ], "14": [ "container", [ { "name": "red", "type": "f32" }, { "name": "green", "type": "f32" }, { "name": "blue", "type": "f32" }, { "name": "scale", "type": "f32" } ] ], "23": [ "container", [ { "name": "blockState", "type": "varint" } ] ], "34": [ "container", [ { "name": "item", "type": "slot" } ] ] }, "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 } ] ], "entityMetadataItem": [ "switch", { "compareTo": "$compareTo", "fields": { "0": "i8", "1": "varint", "2": "f32", "3": "string", "4": "string", "5": [ "option", "string" ], "6": "slot", "7": "bool", "8": [ "container", [ { "name": "pitch", "type": "f32" }, { "name": "yaw", "type": "f32" }, { "name": "roll", "type": "f32" } ] ], "9": "position", "10": [ "option", "position" ], "11": "varint", "12": [ "option", "UUID" ], "13": "varint", "14": "nbt", "15": "particle", "16": [ "container", [ { "name": "villagerType", "type": "varint" }, { "name": "villagerProfession", "type": "varint" }, { "name": "level", "type": "varint" } ] ], "17": "optvarint", "18": "varint" } } ], "entityMetadata": [ "entityMetadataLoop", { "endVal": 255, "type": [ "container", [ { "anon": true, "type": [ "container", [ { "name": "key", "type": "u8" }, { "name": "type", "type": "varint" } ] ] }, { "name": "value", "type": [ "entityMetadataItem", { "compareTo": "type" } ] } ] ] } ], "minecraft_smelting_format": [ "container", [ { "name": "group", "type": "string" }, { "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" } ] } ] ] } ], "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": "string" }, { "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:mob_effect": "void", "minecraft:function": "void", "minecraft:entity_anchor": "void", "minecraft:range": [ "container", [ { "name": "allowDecimals", "type": "bool" } ] ], "minecraft:int_range": "void", "minecraft:float_range": "void", "minecraft:item_enchantment": "void", "minecraft:entity_summon": "void", "minecraft:dimension": "void", "minecraft:nbt_compound_tag": "void", "minecraft:time": "void", "minecraft:resource_or_tag": [ "container", [ { "name": "registry", "type": "string" } ] ], "minecraft:resource": [ "container", [ { "name": "registry", "type": "string" } ] ], "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" } ] ], "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" } ] ], "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": [ "container", [ { "name": "name", "type": [ "mapper", { "type": "varint", "mappings": { "0x00": "login_start", "0x01": "encryption_begin", "0x02": "login_plugin_response" } } ] }, { "name": "params", "type": [ "switch", { "compareTo": "name", "fields": { "login_start": "packet_login_start", "encryption_begin": "packet_encryption_begin", "login_plugin_response": "packet_login_plugin_response" } } ] } ] ] } } }, "play": { "toClient": { "types": { "packet_spawn_entity": [ "container", [ { "name": "entityId", "type": "varint" }, { "name": "objectUUID", "type": "UUID" }, { "name": "type", "type": "varint" }, { "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_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" } ] ], "packet_spawn_entity_painting": [ "container", [ { "name": "entityId", "type": "varint" }, { "name": "entityUUID", "type": "UUID" }, { "name": "title", "type": "varint" }, { "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" } ] ], "packet_animation": [ "container", [ { "name": "entityId", "type": "varint" }, { "name": "animation", "type": "u8" } ] ], "packet_statistics": [ "container", [ { "name": "entries", "type": [ "array", { "countType": "varint", "type": [ "container", [ { "name": "categoryId", "type": "varint" }, { "name": "statisticId", "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"