diff --git a/data/1.16.220/protocol.json b/data/1.16.220/protocol.json new file mode 100644 index 0000000..d12afd5 --- /dev/null +++ b/data/1.16.220/protocol.json @@ -0,0 +1,8315 @@ +{ + "types": { + "varint32": "varint", + "bool": "native", + "zigzag32": "native", + "zigzag64": "native", + "uuid": "native", + "byterot": "native", + "MapInfo": "native", + "nbt": "native", + "BehaviourPackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + } + ] + ] + } + ], + "TexturePackInfos": [ + "array", + { + "countType": "li16", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "size", + "type": "lu64" + }, + { + "name": "content_key", + "type": "string" + }, + { + "name": "sub_pack_name", + "type": "string" + }, + { + "name": "content_identity", + "type": "string" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "rtx_enabled", + "type": "bool" + } + ] + ] + } + ], + "ResourcePackIdVersions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "uuid", + "type": "string" + }, + { + "name": "version", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "ResourcePackIds": [ + "array", + { + "countType": "li16", + "type": "string" + } + ], + "Experiment": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "enabled", + "type": "bool" + } + ] + ], + "Experiments": [ + "array", + { + "countType": "li32", + "type": "Experiment" + } + ], + "GameMode": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "survival", + "1": "creative", + "2": "adventure", + "3": "survival_spectator", + "4": "creative_spectator", + "5": "fallback" + } + } + ], + "GameRule": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "bool", + "2": "int", + "3": "float" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "bool": "bool", + "int": "zigzag32", + "float": "lf32" + }, + "default": "void" + } + ] + } + ] + ], + "GameRules": [ + "array", + { + "countType": "varint", + "type": "GameRule" + } + ], + "Blob": [ + "container", + [ + { + "name": "hash", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "BlockPalette": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "state", + "type": "nbt" + } + ] + ] + } + ], + "Itemstates": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "runtime_id", + "type": "li16" + }, + { + "name": "component_based", + "type": "bool" + } + ] + ] + } + ], + "ItemExtraDataWithBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "blocking_tick", + "type": "li64" + } + ] + ], + "ItemExtraDataWithoutBlockingTick": [ + "container", + [ + { + "name": "has_nbt", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "0": "false", + "65535": "true" + } + } + ] + }, + { + "name": "nbt", + "type": [ + "switch", + { + "compareTo": "has_nbt", + "fields": { + "true": [ + "container", + [ + { + "name": "version", + "type": "u8" + }, + { + "name": "nbt", + "type": "lnbt" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "can_place_on", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + }, + { + "name": "can_destroy", + "type": [ + "array", + { + "countType": "li32", + "type": "ShortArray" + } + ] + } + ] + ], + "ItemLegacy": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "355": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "Item": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "count", + "type": "lu16" + }, + { + "name": "metadata", + "type": "varint" + }, + { + "name": "has_stack_id", + "type": "u8" + }, + { + "name": "stack_id", + "type": [ + "switch", + { + "compareTo": "has_stack_id", + "fields": { + "0": "void" + }, + "default": "zigzag32" + } + ] + }, + { + "name": "block_runtime_id", + "type": "zigzag32" + }, + { + "name": "extra", + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "355": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithBlockingTick" + } + ] + }, + "default": [ + "encapsulated", + { + "lengthType": "varint", + "type": "ItemExtraDataWithoutBlockingTick" + } + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "vec3i": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "vec3u": [ + "container", + [ + { + "name": "x", + "type": "varint" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "varint" + } + ] + ], + "vec3f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "vec2f": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + } + ] + ], + "MetadataDictionary": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "key", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "flags", + "1": "health", + "2": "variant", + "3": "color", + "4": "nametag", + "5": "owner_eid", + "6": "target_eid", + "7": "air", + "8": "potion_color", + "9": "potion_ambient", + "10": "jump_duration", + "11": "hurt_time", + "12": "hurt_direction", + "13": "paddle_time_left", + "14": "paddle_time_right", + "15": "experience_value", + "16": "minecart_display_block", + "17": "minecart_display_offset", + "18": "minecart_has_display", + "20": "old_swell", + "21": "swell_dir", + "22": "charge_amount", + "23": "enderman_held_runtime_id", + "24": "entity_age", + "26": "player_flags", + "27": "player_index", + "28": "player_bed_position", + "29": "fireball_power_x", + "30": "fireball_power_y", + "31": "fireball_power_z", + "32": "aux_power", + "33": "fish_x", + "34": "fish_z", + "35": "fish_angle", + "36": "potion_aux_value", + "37": "lead_holder_eid", + "38": "scale", + "39": "interactive_tag", + "40": "npc_skin_id", + "41": "url_tag", + "42": "max_airdata_max_air", + "43": "mark_variant", + "44": "container_type", + "45": "container_base_size", + "46": "container_extra_slots_per_strength", + "47": "block_target", + "48": "wither_invulnerable_ticks", + "49": "wither_target_1", + "50": "wither_target_2", + "51": "wither_target_3", + "52": "aerial_attack", + "53": "boundingbox_width", + "54": "boundingbox_height", + "55": "fuse_length", + "56": "rider_seat_position", + "57": "rider_rotation_locked", + "58": "rider_max_rotation", + "59": "rider_min_rotation", + "60": "rider_rotation_offset", + "61": "area_effect_cloud_radius", + "62": "area_effect_cloud_waiting", + "63": "area_effect_cloud_particle_id", + "64": "shulker_peek_id", + "65": "shulker_attach_face", + "66": "shulker_attached", + "67": "shulker_attach_pos", + "68": "trading_player_eid", + "69": "trading_career", + "70": "has_command_block", + "71": "command_block_command", + "72": "command_block_last_output", + "73": "command_block_track_output", + "74": "controlling_rider_seat_number", + "75": "strength", + "76": "max_strength", + "77": "spell_casting_color", + "78": "limited_life", + "79": "armor_stand_pose_index", + "80": "ender_crystal_time_offset", + "81": "always_show_nametag", + "82": "color_2", + "83": "name_author", + "84": "score_tag", + "85": "balloon_attached_entity", + "86": "pufferfish_size", + "87": "bubble_time", + "88": "agent", + "89": "sitting_amount", + "90": "sitting_amount_previous", + "91": "eating_counter", + "92": "flags_extended", + "93": "laying_amount", + "94": "laying_amount_previous", + "95": "duration", + "96": "spawn_time", + "97": "change_rate", + "98": "change_on_pickup", + "99": "pickup_count", + "100": "interact_text", + "101": "trade_tier", + "102": "max_trade_tier", + "103": "trade_experience", + "104": "skin_id", + "105": "spawning_frames", + "106": "command_block_tick_delay", + "107": "command_block_execute_on_first_tick", + "108": "ambient_sound_interval", + "109": "ambient_sound_interval_range", + "110": "ambient_sound_event_name", + "111": "fall_damage_multiplier", + "112": "name_raw_text", + "113": "can_ride_target", + "114": "low_tier_cured_discount", + "115": "high_tier_cured_discount", + "116": "nearby_cured_discount", + "117": "nearby_cured_discount_timestamp", + "118": "hitbox", + "119": "is_buoyant", + "120": "buoyancy_data", + "121": "goat_horn_count" + } + } + ] + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "byte", + "1": "short", + "2": "int", + "3": "float", + "4": "string", + "5": "compound", + "6": "vec3i", + "7": "long", + "8": "vec3f" + } + } + ] + }, + { + "name": "value", + "type": [ + "switch", + { + "compareTo": "key", + "fields": { + "flags": "MetadataFlags1", + "flags_extended": "MetadataFlags2" + }, + "default": [ + "switch", + { + "compareTo": "type", + "fields": { + "byte": "i8", + "short": "li16", + "int": "zigzag32", + "float": "lf32", + "string": "string", + "compound": "nbt", + "vec3i": "vec3i", + "long": "zigzag64", + "vec3f": "vec3f" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ], + "Link": [ + "container", + [ + { + "name": "ridden_entity_id", + "type": "zigzag64" + }, + { + "name": "rider_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "immediate", + "type": "bool" + }, + { + "name": "rider_initiated", + "type": "bool" + } + ] + ], + "Links": [ + "array", + { + "countType": "varint", + "type": "Link" + } + ], + "EntityAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "min", + "type": "lf32" + }, + { + "name": "value", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + } + ] + ] + } + ], + "Rotation": [ + "container", + [ + { + "name": "yaw", + "type": "byterot" + }, + { + "name": "pitch", + "type": "byterot" + }, + { + "name": "head_yaw", + "type": "byterot" + } + ] + ], + "BlockCoordinates": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "varint" + }, + { + "name": "z", + "type": "zigzag32" + } + ] + ], + "PlayerAttributes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "min", + "type": "lf32" + }, + { + "name": "max", + "type": "lf32" + }, + { + "name": "current", + "type": "lf32" + }, + { + "name": "default", + "type": "lf32" + }, + { + "name": "name", + "type": "string" + } + ] + ] + } + ], + "TransactionUseItem": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "click_block", + "1": "click_air", + "2": "break_block" + } + } + ] + }, + { + "name": "block_position", + "type": "vec3i" + }, + { + "name": "face", + "type": "varint" + }, + { + "name": "hotbar_slot", + "type": "varint" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + }, + { + "name": "block_runtime_id", + "type": "varint" + } + ] + ], + "TransactionActions": [ + "container", + [ + { + "name": "actions", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "source_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "container", + "1": "global", + "2": "world_interaction", + "3": "creative", + "100": "craft_slot", + "99999": "craft" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "source_type", + "fields": { + "container": [ + "container", + [ + { + "name": "inventory_id", + "type": "varint" + } + ] + ], + "craft": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ], + "world_interaction": [ + "container", + [ + { + "name": "flags", + "type": "varint" + } + ] + ], + "craft_slot": [ + "container", + [ + { + "name": "action", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "old_item", + "type": "Item" + }, + { + "name": "new_item", + "type": "Item" + } + ] + ] + } + ] + } + ] + ], + "TransactionLegacy": [ + "container", + [ + { + "name": "legacy_request_id", + "type": "zigzag32" + }, + { + "name": "legacy_transactions", + "type": [ + "switch", + { + "compareTo": "legacy_request_id", + "fields": { + "0": "void" + }, + "default": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "container_id", + "type": "u8" + }, + { + "name": "changed_slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_id", + "type": "u8" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + } + ] + ], + "Transaction": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "transaction_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "inventory_mismatch", + "2": "item_use", + "3": "item_use_on_entity", + "4": "item_release" + } + } + ] + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "transaction_data", + "type": [ + "switch", + { + "compareTo": "transaction_type", + "fields": { + "normal": "void", + "inventory_mismatch": "void", + "item_use": "TransactionUseItem", + "item_use_on_entity": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "interact", + "1": "attack" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "player_pos", + "type": "vec3f" + }, + { + "name": "click_pos", + "type": "vec3f" + } + ] + ], + "item_release": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "release", + "1": "consume" + } + } + ] + }, + { + "name": "hotbar_slot", + "type": "zigzag32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "head_pos", + "type": "vec3f" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "ItemStacks": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ], + "RecipeIngredient": [ + "container", + [ + { + "name": "network_id", + "type": "zigzag32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "network_id", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "network_data", + "type": "zigzag32" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ], + "PotionTypeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "input_item_meta", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "ingredient_meta", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + }, + { + "name": "output_item_meta", + "type": "zigzag32" + } + ] + ] + } + ], + "PotionContainerChangeRecipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "input_item_id", + "type": "zigzag32" + }, + { + "name": "ingredient_id", + "type": "zigzag32" + }, + { + "name": "output_item_id", + "type": "zigzag32" + } + ] + ] + } + ], + "Recipes": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "shapeless", + "1": "shaped", + "2": "furnace", + "3": "furnace_with_metadata", + "4": "multi", + "5": "shulker_box", + "6": "shapeless_chemistry", + "7": "shaped_chemistry" + } + } + ] + }, + { + "name": "recipe", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "shapeless": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shulker_box": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shapeless_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "RecipeIngredient" + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "shaped_chemistry": [ + "container", + [ + { + "name": "recipe_id", + "type": "string" + }, + { + "name": "width", + "type": "zigzag32" + }, + { + "name": "height", + "type": "zigzag32" + }, + { + "name": "input", + "type": [ + "array", + { + "count": "width", + "type": [ + "array", + { + "count": "height", + "type": "RecipeIngredient" + } + ] + } + ] + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "block", + "type": "string" + }, + { + "name": "priority", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ], + "furnace": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "furnace_with_metadata": [ + "container", + [ + { + "name": "input_id", + "type": "zigzag32" + }, + { + "name": "input_meta", + "type": "zigzag32" + }, + { + "name": "output", + "type": "ItemLegacy" + }, + { + "name": "block", + "type": "string" + } + ] + ], + "multi": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "network_id", + "type": "varint" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "SkinImage": [ + "container", + [ + { + "name": "width", + "type": "li32" + }, + { + "name": "height", + "type": "li32" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "Skin": [ + "container", + [ + { + "name": "skin_id", + "type": "string" + }, + { + "name": "play_fab_id", + "type": "string" + }, + { + "name": "skin_resource_pack", + "type": "string" + }, + { + "name": "skin_data", + "type": "SkinImage" + }, + { + "name": "animations", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "skin_image", + "type": "SkinImage" + }, + { + "name": "animation_type", + "type": "li32" + }, + { + "name": "animation_frames", + "type": "lf32" + }, + { + "name": "expression_type", + "type": "lf32" + } + ] + ] + } + ] + }, + { + "name": "cape_data", + "type": "SkinImage" + }, + { + "name": "geometry_data", + "type": "string" + }, + { + "name": "animation_data", + "type": "string" + }, + { + "name": "premium", + "type": "string" + }, + { + "name": "persona", + "type": "bool" + }, + { + "name": "cape_on_classic", + "type": "bool" + }, + { + "name": "cape_id", + "type": "string" + }, + { + "name": "full_skin_id", + "type": "string" + }, + { + "name": "arm_size", + "type": "string" + }, + { + "name": "skin_color", + "type": "string" + }, + { + "name": "personal_pieces", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_id", + "type": "string" + }, + { + "name": "piece_type", + "type": "string" + }, + { + "name": "pack_id", + "type": "string" + }, + { + "name": "is_default_piece", + "type": "bool" + }, + { + "name": "product_id", + "type": "string" + } + ] + ] + } + ] + }, + { + "name": "piece_tint_colors", + "type": [ + "array", + { + "countType": "li32", + "type": [ + "container", + [ + { + "name": "piece_type", + "type": "string" + }, + { + "name": "colors", + "type": [ + "array", + { + "countType": "li32", + "type": "string" + } + ] + } + ] + ] + } + ] + } + ] + ], + "PlayerRecords": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "remove" + } + } + ] + }, + { + "name": "records_count", + "type": "varint" + }, + { + "name": "records", + "type": [ + "array", + { + "count": "records_count", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "add": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "xbox_user_id", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "build_platform", + "type": "li32" + }, + { + "name": "skin_data", + "type": "Skin" + }, + { + "name": "is_teacher", + "type": "bool" + }, + { + "name": "is_host", + "type": "bool" + } + ] + ], + "remove": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + }, + { + "name": "verified", + "type": [ + "array", + { + "count": "records_count", + "type": "bool" + } + ] + } + ] + ], + "ScoreEntries": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "change", + "1": "remove" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "score", + "type": "li32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "remove": [ + "container", + [ + { + "name": "entry_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "player", + "2": "entity", + "3": "fake_player" + } + } + ] + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "player": "zigzag64", + "entity": "zigzag64" + }, + "default": "void" + } + ] + }, + { + "name": "custom_name", + "type": [ + "switch", + { + "compareTo": "entry_type", + "fields": { + "fake_player": "string" + }, + "default": "void" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "ScoreboardIdentityEntries": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "TYPE_REGISTER_IDENTITY", + "1": "TYPE_CLEAR_IDENTITY" + } + } + ] + }, + { + "name": "entries", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "scoreboard_id", + "type": "zigzag64" + }, + { + "name": "entity_unique_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "TYPE_REGISTER_IDENTITY": "zigzag64" + }, + "default": "void" + } + ] + } + ] + ] + } + ] + } + ] + ], + "Enchant": [ + "container", + [ + { + "name": "id", + "type": "u8" + }, + { + "name": "level", + "type": "u8" + } + ] + ], + "EnchantOptions": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "cost", + "type": "varint" + }, + { + "name": "slot_flags", + "type": "li32" + }, + { + "name": "equip_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "held_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "self_enchants", + "type": [ + "array", + { + "countType": "varint", + "type": "Enchant" + } + ] + }, + { + "name": "name", + "type": "string" + }, + { + "name": "option_id", + "type": "zigzag32" + } + ] + ] + } + ], + "Action": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "start_break", + "1": "abort_break", + "2": "stop_break", + "3": "get_updated_block", + "4": "drop_item", + "5": "start_sleeping", + "6": "stop_sleeping", + "7": "respawn", + "8": "jump", + "9": "start_sprint", + "10": "stop_sprint", + "11": "start_sneak", + "12": "stop_sneak", + "13": "creative_player_destroy_block", + "14": "dimension_change_ack", + "15": "start_glide", + "16": "stop_glide", + "17": "build_denied", + "18": "crack_break", + "19": "change_skin", + "20": "set_enchatnment_seed", + "21": "swimming", + "22": "stop_swimming", + "23": "start_spin_attack", + "24": "stop_spin_attack", + "25": "interact_block", + "26": "predict_break", + "27": "continue_break" + } + } + ], + "StackRequestSlotInfo": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "stack_id", + "type": "zigzag32" + } + ] + ], + "ItemStackRequest": [ + "container", + [ + { + "name": "request_id", + "type": "varint" + }, + { + "name": "actions", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "type_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "take", + "1": "place", + "2": "swap", + "3": "drop", + "4": "destroy", + "5": "consume", + "6": "create", + "7": "lab_table_combine", + "8": "beacon_payment", + "9": "mine_block", + "10": "craft_recipe", + "11": "craft_recipe_auto", + "12": "craft_creative", + "13": "optional", + "14": "non_implemented", + "15": "results_deprecated" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type_id", + "fields": { + "take": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "place": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "swap": [ + "container", + [ + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "destination", + "type": "StackRequestSlotInfo" + } + ] + ], + "drop": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + }, + { + "name": "randomly", + "type": "bool" + } + ] + ], + "destroy": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "consume": [ + "container", + [ + { + "name": "count", + "type": "u8" + }, + { + "name": "source", + "type": "StackRequestSlotInfo" + } + ] + ], + "create": [ + "container", + [ + { + "name": "result_slot_id", + "type": "u8" + } + ] + ], + "beacon_payment": [ + "container", + [ + { + "name": "primary_effect", + "type": "zigzag32" + }, + { + "name": "secondary_effect", + "type": "zigzag32" + } + ] + ], + "mine_block": [ + "container", + [ + { + "name": "unknown1", + "type": "zigzag32" + }, + { + "name": "predicted_durability", + "type": "zigzag32" + }, + { + "name": "network_id", + "type": "zigzag32" + } + ] + ], + "craft_recipe": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_recipe_auto": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + } + ] + ], + "craft_creative": [ + "container", + [ + { + "name": "item_id", + "type": "varint32" + } + ] + ], + "optional": [ + "container", + [ + { + "name": "recipe_network_id", + "type": "varint" + }, + { + "name": "filtered_string_index", + "type": "li32" + } + ] + ], + "non_implemented": "void", + "results_deprecated": [ + "container", + [ + { + "name": "result_items", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemLegacy" + } + ] + }, + { + "name": "times_crafted", + "type": "u8" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + { + "name": "custom_names", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "ItemStackResponses": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "ok", + "1": "error" + } + } + ] + }, + { + "name": "request_id", + "type": "varint32" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "status", + "fields": { + "ok": [ + "container", + [ + { + "name": "containers", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot_type", + "type": "ContainerSlotType" + }, + { + "name": "slots", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "slot", + "type": "u8" + }, + { + "name": "hotbar_slot", + "type": "u8" + }, + { + "name": "count", + "type": "u8" + }, + { + "name": "item_stack_id", + "type": "varint32" + }, + { + "name": "custom_name", + "type": "string" + }, + { + "name": "durability_correction", + "type": "zigzag32" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ], + "ItemComponentList": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ] + } + ], + "CommandOrigin": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "player", + "1": "block", + "2": "minecart_block", + "3": "dev_console", + "4": "test", + "5": "automation_player", + "6": "client_automation", + "7": "dedicated_server", + "8": "entity", + "9": "virtual", + "10": "game_argument", + "11": "entity_server", + "12": "precompiled", + "13": "game_director_entity_server", + "14": "script" + } + } + ] + }, + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "request_id", + "type": "string" + }, + { + "name": "player_entity_id", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "dev_console": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ], + "test": [ + "container", + [ + { + "name": "player_entity_id", + "type": "zigzag64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "WindowID": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowIDVarint": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "inventory", + "1": "first", + "100": "last", + "119": "offhand", + "120": "armor", + "121": "creative", + "122": "hotbar", + "123": "fixed_inventory", + "124": "ui", + "-100": "drop_contents", + "-24": "beacon", + "-23": "trading_output", + "-22": "trading_use_inputs", + "-21": "trading_input_2", + "-20": "trading_input_1", + "-17": "enchant_output", + "-16": "enchant_material", + "-15": "enchant_input", + "-13": "anvil_output", + "-12": "anvil_result", + "-11": "anvil_material", + "-10": "container_input", + "-5": "crafting_use_ingredient", + "-4": "crafting_result", + "-3": "crafting_remove_ingredient", + "-2": "crafting_add_ingredient", + "-1": "none" + } + } + ], + "WindowType": [ + "mapper", + { + "type": "i8", + "mappings": { + "0": "container", + "1": "workbench", + "2": "furnace", + "3": "enchantment", + "4": "brewing_stand", + "5": "anvil", + "6": "dispenser", + "7": "dropper", + "8": "hopper", + "9": "cauldron", + "10": "minecart_chest", + "11": "minecart_hopper", + "12": "horse", + "13": "beacon", + "14": "structure_editor", + "15": "trading", + "16": "command_block", + "17": "jukebox", + "18": "armor", + "19": "hand", + "20": "compound_creator", + "21": "element_constructor", + "22": "material_reducer", + "23": "lab_table", + "24": "loom", + "25": "lectern", + "26": "grindstone", + "27": "blast_furnace", + "28": "smoker", + "29": "stonecutter", + "30": "cartography", + "31": "hud", + "32": "jigsaw_editor", + "33": "smithing_table", + "-9": "none", + "-1": "inventory" + } + } + ], + "ContainerSlotType": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "anvil_input", + "1": "anvil_material", + "2": "anvil_result", + "3": "smithing_table_input", + "4": "smithing_table_material", + "5": "smithing_table_result", + "6": "armor", + "7": "container", + "8": "beacon_payment", + "9": "brewing_input", + "10": "brewing_result", + "11": "brewing_fuel", + "12": "hotbar_and_inventory", + "13": "crafting_input", + "14": "crafting_output", + "15": "recipe_construction", + "16": "recipe_nature", + "17": "recipe_items", + "18": "recipe_search", + "19": "recipe_search_bar", + "20": "recipe_equipment", + "21": "enchanting_input", + "22": "enchanting_lapis", + "23": "furnace_fuel", + "24": "furnace_ingredient", + "25": "furnace_output", + "26": "horse_equip", + "27": "hotbar", + "28": "inventory", + "29": "shulker", + "30": "trade_ingredient1", + "31": "trade_ingredient2", + "32": "trade_result", + "33": "offhand", + "34": "compcreate_input", + "35": "compcreate_output", + "36": "elemconstruct_output", + "37": "matreduce_input", + "38": "matreduce_output", + "39": "labtable_input", + "40": "loom_input", + "41": "loom_dye", + "42": "loom_material", + "43": "loom_result", + "44": "blast_furnace_ingredient", + "45": "smoker_ingredient", + "46": "trade2_ingredient1", + "47": "trade2_ingredient2", + "48": "trade2_result", + "49": "grindstone_input", + "50": "grindstone_additional", + "51": "grindstone_result", + "52": "stonecutter_input", + "53": "stonecutter_result", + "54": "cartography_input", + "55": "cartography_additional", + "56": "cartography_result", + "57": "barrel", + "58": "cursor", + "59": "creative_output" + } + } + ], + "SoundType": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "ItemUseOn", + "1": "Hit", + "2": "Step", + "3": "Fly", + "4": "Jump", + "5": "Break", + "6": "Place", + "7": "HeavyStep", + "8": "Gallop", + "9": "Fall", + "10": "Ambient", + "11": "AmbientBaby", + "12": "AmbientInWater", + "13": "Breathe", + "14": "Death", + "15": "DeathInWater", + "16": "DeathToZombie", + "17": "Hurt", + "18": "HurtInWater", + "19": "Mad", + "20": "Boost", + "21": "Bow", + "22": "SquishBig", + "23": "SquishSmall", + "24": "FallBig", + "25": "FallSmall", + "26": "Splash", + "27": "Fizz", + "28": "Flap", + "29": "Swim", + "30": "Drink", + "31": "Eat", + "32": "Takeoff", + "33": "Shake", + "34": "Plop", + "35": "Land", + "36": "Saddle", + "37": "Armor", + "38": "MobArmorStandPlace", + "39": "AddChest", + "40": "Throw", + "41": "Attack", + "42": "AttackNoDamage", + "43": "AttackStrong", + "44": "Warn", + "45": "Shear", + "46": "Milk", + "47": "Thunder", + "48": "Explode", + "49": "Fire", + "50": "Ignite", + "51": "Fuse", + "52": "Stare", + "53": "Spawn", + "54": "Shoot", + "55": "BreakBlock", + "56": "Launch", + "57": "Blast", + "58": "LargeBlast", + "59": "Twinkle", + "60": "Remedy", + "61": "Infect", + "62": "LevelUp", + "63": "BowHit", + "64": "BulletHit", + "65": "ExtinguishFire", + "66": "ItemFizz", + "67": "ChestOpen", + "68": "ChestClosed", + "69": "ShulkerBoxOpen", + "70": "ShulkerBoxClosed", + "71": "EnderChestOpen", + "72": "EnderChestClosed", + "73": "PowerOn", + "74": "PowerOff", + "75": "Attach", + "76": "Detach", + "77": "Deny", + "78": "Tripod", + "79": "Pop", + "80": "DropSlot", + "81": "Note", + "82": "Thorns", + "83": "PistonIn", + "84": "PistonOut", + "85": "Portal", + "86": "Water", + "87": "LavaPop", + "88": "Lava", + "89": "Burp", + "90": "BucketFillWater", + "91": "BucketFillLava", + "92": "BucketEmptyWater", + "93": "BucketEmptyLava", + "94": "ArmorEquipChain", + "95": "ArmorEquipDiamond", + "96": "ArmorEquipGeneric", + "97": "ArmorEquipGold", + "98": "ArmorEquipIron", + "99": "ArmorEquipLeather", + "100": "ArmorEquipElytra", + "101": "Record13", + "102": "RecordCat", + "103": "RecordBlocks", + "104": "RecordChirp", + "105": "RecordFar", + "106": "RecordMall", + "107": "RecordMellohi", + "108": "RecordStal", + "109": "RecordStrad", + "110": "RecordWard", + "111": "Record11", + "112": "RecordWait", + "113": "unknown1", + "114": "Flop", + "115": "ElderGuardianCurse", + "116": "MobWarning", + "117": "MobWarningBaby", + "118": "Teleport", + "119": "ShulkerOpen", + "120": "ShulkerClose", + "121": "Haggle", + "122": "HaggleYes", + "123": "HaggleNo", + "124": "HaggleIdle", + "125": "ChorusGrow", + "126": "ChorusDeath", + "127": "Glass", + "128": "PotionBrewed", + "129": "CastSpell", + "130": "PrepareAttack", + "131": "PrepareSummon", + "132": "PrepareWololo", + "133": "Fang", + "134": "Charge", + "135": "CameraTakePicture", + "136": "LeashKnotPlace", + "137": "LeashKnotBreak", + "138": "Growl", + "139": "Whine", + "140": "Pant", + "141": "Purr", + "142": "Purreow", + "143": "DeathMinVolume", + "144": "DeathMidVolume", + "145": "unknown2", + "146": "ImitateCaveSpider", + "147": "ImitateCreeper", + "148": "ImitateElderGuardian", + "149": "ImitateEnderDragon", + "150": "ImitateEnderman", + "151": "unknown3", + "152": "ImitateEvocationIllager", + "153": "ImitateGhast", + "154": "ImitateHusk", + "155": "ImitateIllusionIllager", + "156": "ImitateMagmaCube", + "157": "ImitatePolarBear", + "158": "ImitateShulker", + "159": "ImitateSilverfish", + "160": "ImitateSkeleton", + "161": "ImitateSlime", + "162": "ImitateSpider", + "163": "ImitateStray", + "164": "ImitateVex", + "165": "ImitateVindicationIllager", + "166": "ImitateWitch", + "167": "ImitateWither", + "168": "ImitateWitherSkeleton", + "169": "ImitateWolf", + "170": "ImitateZombie", + "171": "ImitateZombiePigman", + "172": "ImitateZombieVillager", + "173": "BlockEndPortalFrameFill", + "174": "BlockEndPortalSpawn", + "175": "RandomAnvilUse", + "176": "BottleDragonBreath", + "177": "PortalTravel", + "178": "ItemTridentHit", + "179": "ItemTridentReturn", + "180": "ItemTridentRiptide1", + "181": "ItemTridentRiptide2", + "182": "ItemTridentRiptide3", + "183": "ItemTridentThrow", + "184": "ItemTridentThunder", + "185": "ItemTridentHitGround", + "186": "Default", + "187": "BlockFletchingTableUse", + "188": "ElemConstructOpen", + "189": "IceBombHit", + "190": "BalloonPop", + "191": "LtReactionIceBomb", + "192": "LtReactionBleach", + "193": "LtReactionEPaste", + "194": "LtReactionEPaste2", + "195": "LtReactionFertilizer", + "196": "LtReactionFireball", + "197": "LtReactionMgsalt", + "198": "LtReactionMiscfire", + "199": "LtReactionFire", + "200": "LtReactionMiscexplosion", + "201": "LtReactionMiscmystical", + "202": "LtReactionMiscmystical2", + "203": "LtReactionProduct", + "204": "SparklerUse", + "205": "GlowstickUse", + "206": "SparklerActive", + "207": "ConvertToDrowned", + "208": "BucketFillFish", + "209": "BucketEmptyFish", + "210": "BubbleUp", + "211": "BubbleDown", + "212": "BubblePop", + "213": "BubbleUpInside", + "214": "BubbleDownInside", + "215": "HurtBaby", + "216": "DeathBaby", + "217": "StepBaby", + "218": "BabySpawn", + "219": "Born", + "220": "BlockTurtleEggBreak", + "221": "BlockTurtleEggCrack", + "222": "BlockTurtleEggHatch", + "223": "TurtleLayEgg", + "224": "BlockTurtleEggAttack", + "225": "BeaconActivate", + "226": "BeaconAmbient", + "227": "BeaconDeactivate", + "228": "BeaconPower", + "229": "ConduitActivate", + "230": "ConduitAmbient", + "231": "ConduitAttack", + "232": "ConduitDeactivate", + "233": "ConduitShort", + "234": "Swoop", + "235": "BlockBambooSaplingPlace", + "236": "PreSneeze", + "237": "Sneeze", + "238": "AmbientTame", + "239": "Scared", + "240": "BlockScaffoldingClimb", + "241": "CrossbowLoadingStart", + "242": "CrossbowLoadingMiddle", + "243": "CrossbowLoadingEnd", + "244": "CrossbowShoot", + "245": "CrossbowQuickChargeStart", + "246": "CrossbowQuickChargeMiddle", + "247": "CrossbowQuickChargeEnd", + "248": "AmbientAggressive", + "249": "AmbientWorried", + "250": "CantBreed", + "251": "ItemShieldBlock", + "252": "ItemBookPut", + "253": "BlockGrindstoneUse", + "254": "BlockBellHit", + "255": "BlockCampfireCrackle", + "256": "Roar", + "257": "Stun", + "258": "BlockSweetBerryBushHurt", + "259": "BlockSweetBerryBushPick", + "260": "UICartographyTableTakeResult", + "261": "UIStoneCutterTakeResult", + "262": "BlockComposterEmpty", + "263": "BlockComposterFill", + "264": "BlockComposterFillSuccess", + "265": "BlockComposterReady", + "266": "BlockBarrelOpen", + "267": "BlockBarrelClose", + "268": "RaidHorn", + "269": "BlockLoomUse", + "270": "AmbientRaid", + "271": "UICartographyTableUse", + "272": "UIStoneCutterUse", + "273": "UILoomUse", + "274": "SmokerUse", + "275": "BlastFurnaceUse", + "276": "SmithingTableUse", + "277": "Screech", + "278": "Sleep", + "279": "FurnaceUse", + "280": "MooshroomConvert", + "281": "MilkSuspiciously", + "282": "Celebrate", + "283": "JumpPrevent", + "284": "AmbientPollinate", + "285": "BeeHiveDrip", + "286": "BeeHiveEnter", + "287": "BeeHiveExit", + "288": "BeeHiveWork", + "289": "BeeHiveShear", + "290": "HoneyBottleDrink", + "291": "AmbientCave", + "292": "Retreat", + "293": "ConvertToZombified", + "294": "Admire", + "295": "StepLava", + "296": "Tempt", + "297": "Panic", + "298": "Angry", + "299": "AmbientWarpedForest", + "300": "AmbientSoulsandValley", + "301": "AmbientNetherWastes", + "302": "AmbientBasaltDeltas", + "303": "AmbientCrimsonForest", + "304": "RespawnAnchorCharge", + "305": "RespawnAnchorDeplete", + "306": "RespawnAnchorSetSpawn", + "307": "RespawnAnchorAmbient", + "308": "SoulEscapeQuiet", + "309": "SoulEscapeLoud", + "310": "RecordPigstep", + "311": "LinkCompassToLodestone", + "312": "BlockSmithingTableUse", + "313": "EquipNetherite", + "314": "AmbientLoopWarpedForest", + "315": "AmbientLoopSoulsandValley", + "316": "AmbientLoopNetherWastes", + "317": "AmbientLoopBasaltDeltas", + "318": "AmbientLoopCrimsonForest", + "319": "AmbientAdditionWarpedForest", + "320": "AmbientAdditionSoulsandValley", + "321": "AmbientAdditionNetherWastes", + "322": "AmbientAdditionBasaltDeltas", + "323": "AmbientAdditionCrimsonForest", + "324": "SculkSensorPowerOn", + "325": "SculkSensorPowerOff", + "326": "BucketFillPowderSnow", + "327": "BucketEmptyPowderSnow", + "328": "PointedDripstoneCauldronDripWater", + "329": "PointedDripstoneCauldronDripLava", + "330": "PointedDripstoneDripWater", + "331": "PointedDripstoneDripLava", + "332": "CaveVinesPickBerries", + "333": "BigDripleafTiltDown", + "334": "BigDripleafTiltUp", + "335": "Undefined" + } + } + ], + "LegacyEntityType": [ + "mapper", + { + "type": "li32", + "mappings": { + "10": "chicken", + "11": "cow", + "12": "pig", + "13": "sheep", + "14": "wolf", + "15": "villager", + "16": "mooshroom", + "17": "squid", + "18": "rabbit", + "19": "bat", + "20": "iron_golem", + "21": "snow_golem", + "22": "ocelot", + "23": "horse", + "24": "donkey", + "25": "mule", + "26": "skeleton_horse", + "27": "zombie_horse", + "28": "polar_bear", + "29": "llama", + "30": "parrot", + "31": "dolphin", + "32": "zombie", + "33": "creeper", + "34": "skeleton", + "35": "spider", + "36": "zombie_pigman", + "37": "slime", + "38": "enderman", + "39": "silverfish", + "40": "cave_spider", + "41": "ghast", + "42": "magma_cube", + "43": "blaze", + "44": "zombie_villager", + "45": "witch", + "46": "stray", + "47": "husk", + "48": "wither_skeleton", + "49": "guardian", + "50": "elder_guardian", + "51": "npc", + "52": "wither", + "53": "ender_dragon", + "54": "shulker", + "55": "endermite", + "56": "agent", + "57": "vindicator", + "58": "phantom", + "61": "armor_stand", + "62": "tripod_camera", + "63": "player", + "64": "item", + "65": "tnt", + "66": "falling_block", + "67": "moving_block", + "68": "xp_bottle", + "69": "xp_orb", + "70": "eye_of_ender_signal", + "71": "ender_crystal", + "72": "fireworks_rocket", + "73": "thrown_trident", + "74": "turtle", + "75": "cat", + "76": "shulker_bullet", + "77": "fishing_hook", + "78": "chalkboard", + "79": "dragon_fireball", + "80": "arrow", + "81": "snowball", + "82": "egg", + "83": "painting", + "84": "minecart", + "85": "fireball", + "86": "splash_potion", + "87": "ender_pearl", + "88": "leash_knot", + "89": "wither_skull", + "90": "boat", + "91": "wither_skull_dangerous", + "93": "lightning_bolt", + "94": "small_fireball", + "95": "area_effect_cloud", + "96": "hopper_minecart", + "97": "tnt_minecart", + "98": "chest_minecart", + "100": "command_block_minecart", + "101": "lingering_potion", + "102": "llama_spit", + "103": "evocation_fang", + "104": "evocation_illager", + "105": "vex", + "106": "ice_bomb", + "107": "balloon", + "108": "pufferfish", + "109": "salmon", + "110": "drowned", + "111": "tropicalfish", + "112": "cod", + "113": "panda" + } + } + ], + "mcpe_packet": [ + "container", + [ + { + "name": "name", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "1": "login", + "2": "play_status", + "3": "server_to_client_handshake", + "4": "client_to_server_handshake", + "5": "disconnect", + "6": "resource_packs_info", + "7": "resource_pack_stack", + "8": "resource_pack_client_response", + "9": "text", + "10": "set_time", + "11": "start_game", + "12": "add_player", + "13": "add_entity", + "14": "remove_entity", + "15": "add_item_entity", + "17": "take_item_entity", + "18": "move_entity", + "19": "move_player", + "20": "rider_jump", + "21": "update_block", + "22": "add_painting", + "23": "tick_sync", + "24": "level_sound_event_old", + "25": "level_event", + "26": "block_event", + "27": "entity_event", + "28": "mob_effect", + "29": "update_attributes", + "30": "inventory_transaction", + "31": "mob_equipment", + "32": "mob_armor_equipment", + "33": "interact", + "34": "block_pick_request", + "35": "entity_pick_request", + "36": "player_action", + "38": "hurt_armor", + "39": "set_entity_data", + "40": "set_entity_motion", + "41": "set_entity_link", + "42": "set_health", + "43": "set_spawn_position", + "44": "animate", + "45": "respawn", + "46": "container_open", + "47": "container_close", + "48": "player_hotbar", + "49": "inventory_content", + "50": "inventory_slot", + "51": "container_set_data", + "52": "crafting_data", + "53": "crafting_event", + "54": "gui_data_pick_item", + "55": "adventure_settings", + "56": "block_entity_data", + "57": "player_input", + "58": "level_chunk", + "59": "set_commands_enabled", + "60": "set_difficulty", + "61": "change_dimension", + "62": "set_player_game_type", + "63": "player_list", + "64": "simple_event", + "65": "event", + "66": "spawn_experience_orb", + "67": "clientbound_map_item_data", + "68": "map_info_request", + "69": "request_chunk_radius", + "70": "chunk_radius_update", + "71": "item_frame_drop_item", + "72": "game_rules_changed", + "73": "camera", + "74": "boss_event", + "75": "show_credits", + "76": "available_commands", + "77": "command_request", + "78": "command_block_update", + "79": "command_output", + "80": "update_trade", + "81": "update_equipment", + "82": "resource_pack_data_info", + "83": "resource_pack_chunk_data", + "84": "resource_pack_chunk_request", + "85": "transfer", + "86": "play_sound", + "87": "stop_sound", + "88": "set_title", + "89": "add_behavior_tree", + "90": "structure_block_update", + "91": "show_store_offer", + "92": "purchase_receipt", + "93": "player_skin", + "94": "sub_client_login", + "95": "initiate_web_socket_connection", + "96": "set_last_hurt_by", + "97": "book_edit", + "98": "npc_request", + "99": "photo_transfer", + "100": "modal_form_request", + "101": "modal_form_response", + "102": "server_settings_request", + "103": "server_settings_response", + "104": "show_profile", + "105": "set_default_game_type", + "106": "remove_objective", + "107": "set_display_objective", + "108": "set_score", + "109": "lab_table", + "110": "update_block_synced", + "111": "move_entity_delta", + "112": "set_scoreboard_identity", + "113": "set_local_player_as_initialized", + "114": "update_soft_enum", + "115": "network_stack_latency", + "117": "script_custom_event", + "118": "spawn_particle_effect", + "119": "available_entity_identifiers", + "120": "level_sound_event_v2", + "121": "network_chunk_publisher_update", + "122": "biome_definition_list", + "123": "level_sound_event", + "124": "level_event_generic", + "125": "lectern_update", + "126": "video_stream_connect", + "127": "add_ecs_entity", + "128": "remove_ecs_entity", + "129": "client_cache_status", + "130": "on_screen_texture_animation", + "131": "map_create_locked_copy", + "132": "structure_template_data_export_request", + "133": "structure_template_data_export_response", + "134": "update_block_properties", + "135": "client_cache_blob_status", + "136": "client_cache_miss_response", + "137": "education_settings", + "139": "multiplayer_settings", + "140": "settings_command", + "141": "anvil_damage", + "142": "completed_using_item", + "143": "network_settings", + "144": "player_auth_input", + "145": "creative_content", + "146": "player_enchant_options", + "147": "item_stack_request", + "148": "item_stack_response", + "149": "player_armor_damage", + "151": "update_player_game_type", + "153": "position_tracking_db_broadcast", + "154": "position_tracking_db_request", + "156": "packet_violation_warning", + "157": "motion_prediction_hints", + "158": "animate_entity", + "159": "camera_shake", + "160": "player_fog", + "161": "correct_player_move_prediction", + "162": "item_component", + "163": "filter_text_packet", + "164": "debug_renderer" + } + } + ] + }, + { + "name": "params", + "type": [ + "switch", + { + "compareTo": "name", + "fields": { + "login": "packet_login", + "play_status": "packet_play_status", + "server_to_client_handshake": "packet_server_to_client_handshake", + "client_to_server_handshake": "packet_client_to_server_handshake", + "disconnect": "packet_disconnect", + "resource_packs_info": "packet_resource_packs_info", + "resource_pack_stack": "packet_resource_pack_stack", + "resource_pack_client_response": "packet_resource_pack_client_response", + "text": "packet_text", + "set_time": "packet_set_time", + "start_game": "packet_start_game", + "add_player": "packet_add_player", + "add_entity": "packet_add_entity", + "remove_entity": "packet_remove_entity", + "add_item_entity": "packet_add_item_entity", + "take_item_entity": "packet_take_item_entity", + "move_entity": "packet_move_entity", + "move_player": "packet_move_player", + "rider_jump": "packet_rider_jump", + "update_block": "packet_update_block", + "add_painting": "packet_add_painting", + "tick_sync": "packet_tick_sync", + "level_sound_event_old": "packet_level_sound_event_old", + "level_event": "packet_level_event", + "block_event": "packet_block_event", + "entity_event": "packet_entity_event", + "mob_effect": "packet_mob_effect", + "update_attributes": "packet_update_attributes", + "inventory_transaction": "packet_inventory_transaction", + "mob_equipment": "packet_mob_equipment", + "mob_armor_equipment": "packet_mob_armor_equipment", + "interact": "packet_interact", + "block_pick_request": "packet_block_pick_request", + "entity_pick_request": "packet_entity_pick_request", + "player_action": "packet_player_action", + "hurt_armor": "packet_hurt_armor", + "set_entity_data": "packet_set_entity_data", + "set_entity_motion": "packet_set_entity_motion", + "set_entity_link": "packet_set_entity_link", + "set_health": "packet_set_health", + "set_spawn_position": "packet_set_spawn_position", + "animate": "packet_animate", + "respawn": "packet_respawn", + "container_open": "packet_container_open", + "container_close": "packet_container_close", + "player_hotbar": "packet_player_hotbar", + "inventory_content": "packet_inventory_content", + "inventory_slot": "packet_inventory_slot", + "container_set_data": "packet_container_set_data", + "crafting_data": "packet_crafting_data", + "crafting_event": "packet_crafting_event", + "gui_data_pick_item": "packet_gui_data_pick_item", + "adventure_settings": "packet_adventure_settings", + "block_entity_data": "packet_block_entity_data", + "player_input": "packet_player_input", + "level_chunk": "packet_level_chunk", + "set_commands_enabled": "packet_set_commands_enabled", + "set_difficulty": "packet_set_difficulty", + "change_dimension": "packet_change_dimension", + "set_player_game_type": "packet_set_player_game_type", + "player_list": "packet_player_list", + "simple_event": "packet_simple_event", + "event": "packet_event", + "spawn_experience_orb": "packet_spawn_experience_orb", + "clientbound_map_item_data": "packet_clientbound_map_item_data", + "map_info_request": "packet_map_info_request", + "request_chunk_radius": "packet_request_chunk_radius", + "chunk_radius_update": "packet_chunk_radius_update", + "item_frame_drop_item": "packet_item_frame_drop_item", + "game_rules_changed": "packet_game_rules_changed", + "camera": "packet_camera", + "boss_event": "packet_boss_event", + "show_credits": "packet_show_credits", + "available_commands": "packet_available_commands", + "command_request": "packet_command_request", + "command_block_update": "packet_command_block_update", + "command_output": "packet_command_output", + "update_trade": "packet_update_trade", + "update_equipment": "packet_update_equipment", + "resource_pack_data_info": "packet_resource_pack_data_info", + "resource_pack_chunk_data": "packet_resource_pack_chunk_data", + "resource_pack_chunk_request": "packet_resource_pack_chunk_request", + "transfer": "packet_transfer", + "play_sound": "packet_play_sound", + "stop_sound": "packet_stop_sound", + "set_title": "packet_set_title", + "add_behavior_tree": "packet_add_behavior_tree", + "structure_block_update": "packet_structure_block_update", + "show_store_offer": "packet_show_store_offer", + "purchase_receipt": "packet_purchase_receipt", + "player_skin": "packet_player_skin", + "sub_client_login": "packet_sub_client_login", + "initiate_web_socket_connection": "packet_initiate_web_socket_connection", + "set_last_hurt_by": "packet_set_last_hurt_by", + "book_edit": "packet_book_edit", + "npc_request": "packet_npc_request", + "photo_transfer": "packet_photo_transfer", + "modal_form_request": "packet_modal_form_request", + "modal_form_response": "packet_modal_form_response", + "server_settings_request": "packet_server_settings_request", + "server_settings_response": "packet_server_settings_response", + "show_profile": "packet_show_profile", + "set_default_game_type": "packet_set_default_game_type", + "remove_objective": "packet_remove_objective", + "set_display_objective": "packet_set_display_objective", + "set_score": "packet_set_score", + "lab_table": "packet_lab_table", + "update_block_synced": "packet_update_block_synced", + "move_entity_delta": "packet_move_entity_delta", + "set_scoreboard_identity": "packet_set_scoreboard_identity", + "set_local_player_as_initialized": "packet_set_local_player_as_initialized", + "update_soft_enum": "packet_update_soft_enum", + "network_stack_latency": "packet_network_stack_latency", + "script_custom_event": "packet_script_custom_event", + "spawn_particle_effect": "packet_spawn_particle_effect", + "available_entity_identifiers": "packet_available_entity_identifiers", + "level_sound_event_v2": "packet_level_sound_event_v2", + "network_chunk_publisher_update": "packet_network_chunk_publisher_update", + "biome_definition_list": "packet_biome_definition_list", + "level_sound_event": "packet_level_sound_event", + "level_event_generic": "packet_level_event_generic", + "lectern_update": "packet_lectern_update", + "video_stream_connect": "packet_video_stream_connect", + "add_ecs_entity": "packet_add_ecs_entity", + "remove_ecs_entity": "packet_remove_ecs_entity", + "client_cache_status": "packet_client_cache_status", + "on_screen_texture_animation": "packet_on_screen_texture_animation", + "map_create_locked_copy": "packet_map_create_locked_copy", + "structure_template_data_export_request": "packet_structure_template_data_export_request", + "structure_template_data_export_response": "packet_structure_template_data_export_response", + "update_block_properties": "packet_update_block_properties", + "client_cache_blob_status": "packet_client_cache_blob_status", + "client_cache_miss_response": "packet_client_cache_miss_response", + "education_settings": "packet_education_settings", + "multiplayer_settings": "packet_multiplayer_settings", + "settings_command": "packet_settings_command", + "anvil_damage": "packet_anvil_damage", + "completed_using_item": "packet_completed_using_item", + "network_settings": "packet_network_settings", + "player_auth_input": "packet_player_auth_input", + "creative_content": "packet_creative_content", + "player_enchant_options": "packet_player_enchant_options", + "item_stack_request": "packet_item_stack_request", + "item_stack_response": "packet_item_stack_response", + "player_armor_damage": "packet_player_armor_damage", + "update_player_game_type": "packet_update_player_game_type", + "position_tracking_db_request": "packet_position_tracking_db_request", + "position_tracking_db_broadcast": "packet_position_tracking_db_broadcast", + "packet_violation_warning": "packet_packet_violation_warning", + "motion_prediction_hints": "packet_motion_prediction_hints", + "animate_entity": "packet_animate_entity", + "camera_shake": "packet_camera_shake", + "player_fog": "packet_player_fog", + "correct_player_move_prediction": "packet_correct_player_move_prediction", + "item_component": "packet_item_component", + "filter_text_packet": "packet_filter_text_packet", + "debug_renderer": "packet_debug_renderer" + }, + "default": "void" + } + ] + } + ] + ], + "packet_login": [ + "container", + [ + { + "name": "protocol_version", + "type": "i32" + }, + { + "name": "payload_size", + "type": "varint" + }, + { + "name": "chain", + "type": "LittleString" + }, + { + "name": "client_data", + "type": "LittleString" + } + ] + ], + "packet_play_status": [ + "container", + [ + { + "name": "status", + "type": [ + "mapper", + { + "type": "i32", + "mappings": { + "0": "login_success", + "1": "failed_client", + "2": "failed_spawn", + "3": "player_spawn", + "4": "failed_invalid_tenant", + "5": "failed_vanilla_edu", + "6": "failed_edu_vanilla", + "7": "failed_server_full" + } + } + ] + } + ] + ], + "packet_server_to_client_handshake": [ + "container", + [ + { + "name": "token", + "type": "string" + } + ] + ], + "packet_client_to_server_handshake": [ + "container", + [] + ], + "packet_disconnect": [ + "container", + [ + { + "name": "hide_disconnect_reason", + "type": "bool" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "packet_resource_packs_info": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "has_scripts", + "type": "bool" + }, + { + "name": "behaviour_packs", + "type": "BehaviourPackInfos" + }, + { + "name": "texture_packs", + "type": "TexturePackInfos" + } + ] + ], + "packet_resource_pack_stack": [ + "container", + [ + { + "name": "must_accept", + "type": "bool" + }, + { + "name": "behavior_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "resource_packs", + "type": "ResourcePackIdVersions" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + } + ] + ], + "packet_resource_pack_client_response": [ + "container", + [ + { + "name": "response_status", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "none", + "1": "refused", + "2": "send_packs", + "3": "have_all_packs", + "4": "completed" + } + } + ] + }, + { + "name": "resourcepackids", + "type": "ResourcePackIds" + } + ] + ], + "packet_text": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "raw", + "1": "chat", + "2": "translation", + "3": "popup", + "4": "jukebox_popup", + "5": "tip", + "6": "system", + "7": "whisper", + "8": "announcement", + "9": "json_whisper", + "10": "json" + } + } + ] + }, + { + "name": "needs_translation", + "type": "bool" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "chat": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "whisper": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "announcement": [ + "container", + [ + { + "name": "source_name", + "type": "string" + }, + { + "name": "message", + "type": "string" + } + ] + ], + "raw": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "tip": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "system": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json_whisper": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "json": [ + "container", + [ + { + "name": "message", + "type": "string" + } + ] + ], + "translation": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "jukebox_popup": [ + "container", + [ + { + "name": "message", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "xuid", + "type": "string" + }, + { + "name": "platform_chat_id", + "type": "string" + } + ] + ], + "packet_set_time": [ + "container", + [ + { + "name": "time", + "type": "zigzag32" + } + ] + ], + "packet_start_game": [ + "container", + [ + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "player_gamemode", + "type": "GameMode" + }, + { + "name": "player_position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "vec2f" + }, + { + "name": "seed", + "type": "zigzag32" + }, + { + "name": "biome_type", + "type": "li16" + }, + { + "name": "biome_name", + "type": "string" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "generator", + "type": "zigzag32" + }, + { + "name": "world_gamemode", + "type": "GameMode" + }, + { + "name": "difficulty", + "type": "zigzag32" + }, + { + "name": "spawn_position", + "type": "BlockCoordinates" + }, + { + "name": "achievements_disabled", + "type": "bool" + }, + { + "name": "day_cycle_stop_time", + "type": "zigzag32" + }, + { + "name": "edu_offer", + "type": "zigzag32" + }, + { + "name": "edu_features_enabled", + "type": "bool" + }, + { + "name": "edu_product_uuid", + "type": "string" + }, + { + "name": "rain_level", + "type": "lf32" + }, + { + "name": "lightning_level", + "type": "lf32" + }, + { + "name": "has_confirmed_platform_locked_content", + "type": "bool" + }, + { + "name": "is_multiplayer", + "type": "bool" + }, + { + "name": "broadcast_to_lan", + "type": "bool" + }, + { + "name": "xbox_live_broadcast_mode", + "type": "varint" + }, + { + "name": "platform_broadcast_mode", + "type": "varint" + }, + { + "name": "enable_commands", + "type": "bool" + }, + { + "name": "is_texturepacks_required", + "type": "bool" + }, + { + "name": "gamerules", + "type": "GameRules" + }, + { + "name": "experiments", + "type": "Experiments" + }, + { + "name": "experiments_previously_used", + "type": "bool" + }, + { + "name": "bonus_chest", + "type": "bool" + }, + { + "name": "map_enabled", + "type": "bool" + }, + { + "name": "permission_level", + "type": "zigzag32" + }, + { + "name": "server_chunk_tick_range", + "type": "li32" + }, + { + "name": "has_locked_behavior_pack", + "type": "bool" + }, + { + "name": "has_locked_resource_pack", + "type": "bool" + }, + { + "name": "is_from_locked_world_template", + "type": "bool" + }, + { + "name": "msa_gamertags_only", + "type": "bool" + }, + { + "name": "is_from_world_template", + "type": "bool" + }, + { + "name": "is_world_template_option_locked", + "type": "bool" + }, + { + "name": "only_spawn_v1_villagers", + "type": "bool" + }, + { + "name": "game_version", + "type": "string" + }, + { + "name": "limited_world_width", + "type": "li32" + }, + { + "name": "limited_world_length", + "type": "li32" + }, + { + "name": "is_new_nether", + "type": "bool" + }, + { + "name": "experimental_gameplay_override", + "type": "bool" + }, + { + "name": "level_id", + "type": "string" + }, + { + "name": "world_name", + "type": "string" + }, + { + "name": "premium_world_template_id", + "type": "string" + }, + { + "name": "is_trial", + "type": "bool" + }, + { + "name": "movement_authority", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "client", + "1": "server", + "2": "server_with_rewind" + } + } + ] + }, + { + "name": "rewind_history_size", + "type": "zigzag32" + }, + { + "name": "server_authoritative_block_breaking", + "type": "bool" + }, + { + "name": "current_tick", + "type": "li64" + }, + { + "name": "enchantment_seed", + "type": "zigzag32" + }, + { + "name": "block_palette", + "type": "BlockPalette" + }, + { + "name": "itemstates", + "type": "Itemstates" + }, + { + "name": "multiplayer_correlation_id", + "type": "string" + }, + { + "name": "server_authoritative_inventory", + "type": "bool" + } + ] + ], + "packet_add_player": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "username", + "type": "string" + }, + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "platform_chat_id", + "type": "string" + }, + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + }, + { + "name": "speed_x", + "type": "lf32" + }, + { + "name": "speed_y", + "type": "lf32" + }, + { + "name": "speed_z", + "type": "lf32" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "held_item", + "type": "Item" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "flags", + "type": "varint" + }, + { + "name": "command_permission", + "type": "varint" + }, + { + "name": "action_permissions", + "type": "varint" + }, + { + "name": "permission_level", + "type": "varint" + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + }, + { + "name": "links", + "type": "Links" + }, + { + "name": "device_id", + "type": "string" + }, + { + "name": "device_os", + "type": "li32" + } + ] + ], + "packet_add_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + }, + { + "name": "speed_x", + "type": "lf32" + }, + { + "name": "speed_y", + "type": "lf32" + }, + { + "name": "speed_z", + "type": "lf32" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "attributes", + "type": "EntityAttributes" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "links", + "type": "Links" + } + ] + ], + "packet_remove_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + } + ] + ], + "packet_add_item_entity": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + }, + { + "name": "speed_x", + "type": "lf32" + }, + { + "name": "speed_y", + "type": "lf32" + }, + { + "name": "speed_z", + "type": "lf32" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "is_from_fishing", + "type": "bool" + } + ] + ], + "packet_take_item_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "target", + "type": "varint" + } + ] + ], + "packet_move_entity": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "rotation", + "type": "Rotation" + } + ] + ], + "packet_move_player": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "mode", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "normal", + "1": "reset", + "2": "teleport", + "3": "rotation" + } + } + ] + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "ridden_runtime_id", + "type": "varint" + }, + { + "name": "teleport", + "type": [ + "switch", + { + "compareTo": "mode", + "fields": { + "teleport": [ + "container", + [ + { + "name": "cause", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "unknown", + "1": "projectile", + "2": "chorus_fruit", + "3": "command", + "4": "behavior" + } + } + ] + }, + { + "name": "source_entity_type", + "type": "LegacyEntityType" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_rider_jump": [ + "container", + [ + { + "name": "jump_strength", + "type": "zigzag32" + } + ] + ], + "packet_update_block": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + } + ] + ], + "packet_add_painting": [ + "container", + [ + { + "name": "entity_id_self", + "type": "zigzag64" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "direction", + "type": "zigzag32" + }, + { + "name": "title", + "type": "string" + } + ] + ], + "packet_tick_sync": [ + "container", + [ + { + "name": "request_time", + "type": "li64" + }, + { + "name": "response_time", + "type": "li64" + } + ] + ], + "packet_level_sound_event_old": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "zigzag32" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event": [ + "container", + [ + { + "name": "event", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "1000": "sound_click", + "1001": "sound_click_fail", + "1002": "sound_shoot", + "1003": "sound_door", + "1004": "sound_fizz", + "1005": "sound_ignite", + "1007": "sound_ghast", + "1008": "sound_ghast_shoot", + "1009": "sound_blaze_shoot", + "1010": "sound_door_bump", + "1012": "sound_door_crash", + "1018": "sound_enderman_teleport", + "1020": "sound_anvil_break", + "1021": "sound_anvil_use", + "1022": "sound_anvil_fall", + "1030": "sound_pop", + "1032": "sound_portal", + "1040": "sound_itemframe_add_item", + "1041": "sound_itemframe_remove", + "1042": "sound_itemframe_place", + "1043": "sound_itemframe_remove_item", + "1044": "sound_itemframe_rotate_item", + "1050": "sound_camera", + "1051": "sound_orb", + "1052": "sound_totem", + "1060": "sound_armor_stand_break", + "1061": "sound_armor_stand_hit", + "1062": "sound_armor_stand_fall", + "1063": "sound_armor_stand_place", + "1064": "pointed_dripstone_land", + "1065": "dye_used", + "1066": "ink_sack_used", + "2000": "particle_shoot", + "2001": "particle_destroy", + "2002": "particle_splash", + "2003": "particle_eye_despawn", + "2004": "particle_spawn", + "2005": "particle_crop_growth", + "2006": "particle_guardian_curse", + "2007": "particle_death_smoke", + "2008": "particle_block_force_field", + "2009": "particle_projectile_hit", + "2010": "particle_dragon_egg_teleport", + "2011": "particle_crop_eaten", + "2012": "particle_critical", + "2013": "particle_enderman_teleport", + "2014": "particle_punch_block", + "2015": "particle_bubble", + "2016": "particle_evaporate", + "2017": "particle_destroy_armor_stand", + "2018": "particle_breaking_egg", + "2019": "particle_destroy_egg", + "2020": "particle_evaporate_water", + "2021": "particle_destroy_block_no_sound", + "2022": "particle_knockback_roar", + "2023": "particle_teleport_trail", + "2024": "particle_point_cloud", + "2025": "particle_explosion", + "2026": "particle_block_explosion", + "2027": "particle_vibration_signal", + "2028": "particle_dripstone_drip", + "2029": "particle_fizz_effect", + "2030": "particle_wax_on", + "2031": "particle_wax_off", + "2032": "particle_scrape", + "2033": "particle_electric_spark", + "3001": "start_rain", + "3002": "start_thunder", + "3003": "stop_rain", + "3004": "stop_thunder", + "3005": "pause_game", + "3006": "pause_game_no_screen", + "3007": "set_game_speed", + "3500": "redstone_trigger", + "3501": "cauldron_explode", + "3502": "cauldron_dye_armor", + "3503": "cauldron_clean_armor", + "3504": "cauldron_fill_potion", + "3505": "cauldron_take_potion", + "3506": "cauldron_fill_water", + "3507": "cauldron_take_water", + "3508": "cauldron_add_dye", + "3509": "cauldron_clean_banner", + "3600": "block_start_break", + "3601": "block_stop_break", + "4000": "set_data", + "9800": "players_sleeping", + "16384": "add_particle_mask" + } + } + ] + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_block_event": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "sound", + "1": "change_state" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_entity_event": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "1": "jump", + "2": "hurt_animation", + "3": "death_animation", + "4": "arm_swing", + "5": "stop_attack", + "6": "tame_fail", + "7": "tame_success", + "8": "shake_wet", + "9": "use_item", + "10": "eat_grass_animation", + "11": "fish_hook_bubble", + "12": "fish_hook_position", + "13": "fish_hook_hook", + "14": "fish_hook_tease", + "15": "squid_ink_cloud", + "16": "zombie_villager_cure", + "18": "respawn", + "19": "iron_golem_offer_flower", + "20": "iron_golem_withdraw_flower", + "21": "love_particles", + "22": "villager_angry", + "23": "villager_happy", + "24": "witch_spell_particles", + "25": "firework_particles", + "26": "in_love_particles", + "27": "silverfish_spawn_animation", + "28": "guardian_attack", + "29": "witch_drink_potion", + "30": "witch_throw_potion", + "31": "minecart_tnt_prime_fuse", + "32": "creeper_prime_fuse", + "33": "air_supply_expired", + "34": "player_add_xp_levels", + "35": "elder_guardian_curse", + "36": "agent_arm_swing", + "37": "ender_dragon_death", + "38": "dust_particles", + "39": "arrow_shake", + "57": "eating_item", + "60": "baby_animal_feed", + "61": "death_smoke_cloud", + "62": "complete_trade", + "63": "remove_leash", + "65": "consume_totem", + "66": "player_check_treasure_hunter_achievement", + "67": "entity_spawn", + "68": "dragon_puke", + "69": "item_entity_merge", + "70": "start_swim", + "71": "balloon_pop", + "72": "treasure_hunt", + "73": "agent_summon", + "74": "charged_crossbow", + "75": "fall" + } + } + ] + }, + { + "name": "data", + "type": "zigzag32" + } + ] + ], + "packet_mob_effect": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "event_id", + "type": "u8" + }, + { + "name": "effect_id", + "type": "zigzag32" + }, + { + "name": "amplifier", + "type": "zigzag32" + }, + { + "name": "particles", + "type": "bool" + }, + { + "name": "duration", + "type": "zigzag32" + } + ] + ], + "packet_update_attributes": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "attributes", + "type": "PlayerAttributes" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_inventory_transaction": [ + "container", + [ + { + "name": "transaction", + "type": "Transaction" + } + ] + ], + "packet_mob_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "item", + "type": "Item" + }, + { + "name": "slot", + "type": "u8" + }, + { + "name": "selected_slot", + "type": "u8" + }, + { + "name": "window_id", + "type": "WindowID" + } + ] + ], + "packet_mob_armor_equipment": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "helmet", + "type": "Item" + }, + { + "name": "chestplate", + "type": "Item" + }, + { + "name": "leggings", + "type": "Item" + }, + { + "name": "boots", + "type": "Item" + } + ] + ], + "packet_interact": [ + "container", + [ + { + "name": "action_id", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "3": "leave_vehicle", + "4": "mouse_over_entity", + "6": "open_inventory" + } + } + ] + }, + { + "name": "target_entity_id", + "type": "varint64" + }, + { + "name": "position", + "type": [ + "switch", + { + "compareTo": "action_id", + "fields": { + "mouse_over_entity": "vec3f", + "leave_vehicle": "vec3f" + }, + "default": "void" + } + ] + } + ] + ], + "packet_block_pick_request": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "y", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "add_user_data", + "type": "bool" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_entity_pick_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "lu64" + }, + { + "name": "selected_slot", + "type": "u8" + } + ] + ], + "packet_player_action": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "action", + "type": "Action" + }, + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "packet_hurt_armor": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_entity_data": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "metadata", + "type": "MetadataDictionary" + }, + { + "name": "tick", + "type": "varint" + } + ] + ], + "packet_set_entity_motion": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + } + ] + ], + "packet_set_entity_link": [ + "container", + [ + { + "name": "link", + "type": "Link" + } + ] + ], + "packet_set_health": [ + "container", + [ + { + "name": "health", + "type": "zigzag32" + } + ] + ], + "packet_set_spawn_position": [ + "container", + [ + { + "name": "spawn_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "player", + "1": "world" + } + } + ] + }, + { + "name": "player_position", + "type": "BlockCoordinates" + }, + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "world_position", + "type": "BlockCoordinates" + } + ] + ], + "packet_animate": [ + "container", + [ + { + "name": "action_id", + "type": "zigzag32" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_respawn": [ + "container", + [ + { + "name": "x", + "type": "lf32" + }, + { + "name": "y", + "type": "lf32" + }, + { + "name": "z", + "type": "lf32" + }, + { + "name": "state", + "type": "u8" + }, + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_container_open": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "runtime_entity_id", + "type": "zigzag64" + } + ] + ], + "packet_container_close": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "server", + "type": "bool" + } + ] + ], + "packet_player_hotbar": [ + "container", + [ + { + "name": "selected_slot", + "type": "varint" + }, + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "select_slot", + "type": "bool" + } + ] + ], + "packet_inventory_content": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "input", + "type": "ItemStacks" + } + ] + ], + "packet_inventory_slot": [ + "container", + [ + { + "name": "window_id", + "type": "WindowIDVarint" + }, + { + "name": "slot", + "type": "varint" + }, + { + "name": "item", + "type": "Item" + } + ] + ], + "packet_container_set_data": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "property", + "type": "zigzag32" + }, + { + "name": "value", + "type": "zigzag32" + } + ] + ], + "packet_crafting_data": [ + "container", + [ + { + "name": "recipes", + "type": "Recipes" + }, + { + "name": "potion_type_recipes", + "type": "PotionTypeRecipes" + }, + { + "name": "potion_container_recipes", + "type": "PotionContainerChangeRecipes" + }, + { + "name": "is_clean", + "type": "bool" + } + ] + ], + "packet_crafting_event": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "recipe_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "inventory", + "1": "crafting", + "2": "workbench" + } + } + ] + }, + { + "name": "recipe_id", + "type": "uuid" + }, + { + "name": "input", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + }, + { + "name": "result", + "type": [ + "array", + { + "countType": "varint", + "type": "Item" + } + ] + } + ] + ], + "packet_gui_data_pick_item": [ + "container", + [ + { + "name": "item_name", + "type": "string" + }, + { + "name": "item_effects", + "type": "string" + }, + { + "name": "hotbar_slot", + "type": "li32" + } + ] + ], + "packet_adventure_settings": [ + "container", + [ + { + "name": "flags", + "type": "AdventureFlags" + }, + { + "name": "command_permission", + "type": [ + "mapper", + { + "type": "varint32", + "mappings": { + "0": "normal", + "1": "operator", + "2": "host", + "3": "automation", + "4": "admin" + } + } + ] + }, + { + "name": "action_permissions", + "type": "ActionPermissions" + }, + { + "name": "permission_level", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "visitor", + "1": "member", + "2": "operator", + "3": "custom" + } + } + ] + }, + { + "name": "custom_stored_permissions", + "type": "varint" + }, + { + "name": "user_id", + "type": "li64" + } + ] + ], + "packet_block_entity_data": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_player_input": [ + "container", + [ + { + "name": "motion_x", + "type": "lf32" + }, + { + "name": "motion_z", + "type": "lf32" + }, + { + "name": "jumping", + "type": "bool" + }, + { + "name": "sneaking", + "type": "bool" + } + ] + ], + "packet_level_chunk": [ + "container", + [ + { + "name": "x", + "type": "zigzag32" + }, + { + "name": "z", + "type": "zigzag32" + }, + { + "name": "sub_chunk_count", + "type": "varint" + }, + { + "name": "cache_enabled", + "type": "bool" + }, + { + "name": "blobs", + "type": [ + "switch", + { + "compareTo": "cache_enabled", + "fields": { + "true": [ + "container", + [ + { + "name": "hashes", + "type": [ + "array", + { + "countType": "varint", + "type": "lu64" + } + ] + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_set_commands_enabled": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_set_difficulty": [ + "container", + [ + { + "name": "difficulty", + "type": "varint" + } + ] + ], + "packet_change_dimension": [ + "container", + [ + { + "name": "dimension", + "type": "zigzag32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "respawn", + "type": "bool" + } + ] + ], + "packet_set_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_player_list": [ + "container", + [ + { + "name": "records", + "type": "PlayerRecords" + } + ] + ], + "packet_simple_event": [ + "container", + [ + { + "name": "event_type", + "type": "lu16" + } + ] + ], + "packet_event": [ + "container", + [ + { + "name": "runtime_id", + "type": "varint64" + }, + { + "name": "event_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "achievement_awarded", + "1": "entity_interact", + "2": "portal_built", + "3": "portal_used", + "4": "mob_killed", + "5": "cauldron_used", + "6": "player_death", + "7": "boss_killed", + "8": "agent_command", + "9": "agent_created", + "10": "banner_pattern_removed", + "11": "commaned_executed", + "12": "fish_bucketed", + "13": "mob_born", + "14": "pet_died", + "15": "cauldron_block_used", + "16": "composter_block_used", + "17": "bell_block_used", + "18": "actor_definition", + "19": "raid_update", + "20": "player_movement_anomaly", + "21": "player_moement_corrected", + "22": "honey_harvested", + "23": "target_block_hit", + "24": "piglin_barter" + } + } + ] + }, + { + "name": "use_player_id", + "type": "u8" + }, + { + "name": "event_data", + "type": "restBuffer" + } + ] + ], + "packet_spawn_experience_orb": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "count", + "type": "zigzag32" + } + ] + ], + "packet_clientbound_map_item_data": [ + "container", + [ + { + "name": "mapinfo", + "type": "MapInfo" + } + ] + ], + "packet_map_info_request": [ + "container", + [ + { + "name": "map_id", + "type": "zigzag64" + } + ] + ], + "packet_request_chunk_radius": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_chunk_radius_update": [ + "container", + [ + { + "name": "chunk_radius", + "type": "zigzag32" + } + ] + ], + "packet_item_frame_drop_item": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + } + ] + ], + "packet_game_rules_changed": [ + "container", + [ + { + "name": "rules", + "type": "GameRules" + } + ] + ], + "packet_camera": [ + "container", + [ + { + "name": "camera_entity_unique_id", + "type": "zigzag64" + }, + { + "name": "target_player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_boss_event": [ + "container", + [ + { + "name": "boss_entity_id", + "type": "zigzag64" + }, + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "show_bar", + "1": "register_player", + "2": "hide_bar", + "3": "unregister_player", + "4": "set_bar_progress", + "5": "set_bar_title", + "6": "update_properties", + "7": "texture" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "register_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "unregister_player": [ + "container", + [ + { + "name": "player_id", + "type": "zigzag64" + } + ] + ], + "show": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "bar_progress", + "type": "lf32" + } + ] + ], + "update_properties": [ + "container", + [ + { + "name": "darkness_factor", + "type": "li16" + } + ] + ], + "texture": [ + "container", + [ + { + "name": "color", + "type": "varint" + }, + { + "name": "overlay", + "type": "varint" + } + ] + ], + "set_bar_progress": [ + "container", + [ + { + "name": "bar_progress", + "type": "lf32" + } + ] + ], + "set_bar_title": [ + "container", + [ + { + "name": "title", + "type": "string" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_show_credits": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "status", + "type": "zigzag32" + } + ] + ], + "packet_available_commands": [ + "container", + [ + { + "name": "values_len", + "type": "varint" + }, + { + "name": "_enum_type", + "type": [ + "enum_size_based_on_values_len" + ] + }, + { + "name": "enum_values", + "type": [ + "array", + { + "count": "values_len", + "type": "string" + } + ] + }, + { + "name": "suffixes", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + }, + { + "name": "enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "switch", + { + "compareTo": "../_enum_type", + "fields": { + "byte": "u8", + "short": "lu16", + "int": "lu32" + }, + "default": "void" + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "command_data", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "description", + "type": "string" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "permission_level", + "type": "u8" + }, + { + "name": "alias", + "type": "li32" + }, + { + "name": "overloads", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "paramater_name", + "type": "string" + }, + { + "name": "value_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "1": "int", + "2": "float", + "3": "value", + "4": "wildcard_int", + "5": "operator", + "6": "target", + "16": "file_path", + "32": "string", + "40": "position", + "44": "message", + "46": "raw_text", + "50": "json", + "63": "command" + } + } + ] + }, + { + "name": "enum_type", + "type": [ + "mapper", + { + "type": "lu16", + "mappings": { + "16": "valid", + "32": "enum", + "256": "suffixed", + "1024": "soft_enum" + } + } + ] + }, + { + "name": "optional", + "type": "bool" + }, + { + "name": "options", + "type": "CommandFlags" + } + ] + ] + } + ] + } + ] + } + ] + ] + } + ] + }, + { + "name": "dynamic_enums", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "values", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "enum_constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "value_index", + "type": "li32" + }, + { + "name": "enum_index", + "type": "li32" + }, + { + "name": "constraints", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "constraint", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "cheats_enabled", + "1": "operator_permissions", + "2": "host_permissions" + } + } + ] + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], + "packet_command_request": [ + "container", + [ + { + "name": "command", + "type": "string" + }, + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "interval", + "type": "bool" + } + ] + ], + "packet_command_block_update": [ + "container", + [ + { + "name": "is_block", + "type": "bool" + } + ] + ], + "packet_command_output": [ + "container", + [ + { + "name": "origin", + "type": "CommandOrigin" + }, + { + "name": "output_type", + "type": [ + "mapper", + { + "type": "i8", + "mappings": { + "1": "last", + "2": "silent", + "3": "all", + "4": "data_set" + } + } + ] + }, + { + "name": "success_count", + "type": "varint" + }, + { + "name": "output", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "success", + "type": "bool" + }, + { + "name": "message_id", + "type": "string" + }, + { + "name": "paramaters", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ] + } + ] + }, + { + "name": "data_set", + "type": [ + "switch", + { + "compareTo": "output_type", + "fields": { + "data_set": "string" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_trade": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "varint" + }, + { + "name": "trade_tier", + "type": "varint" + }, + { + "name": "villager_unique_id", + "type": "varint64" + }, + { + "name": "entity_unique_id", + "type": "varint64" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "new_trading_ui", + "type": "bool" + }, + { + "name": "economic_trades", + "type": "bool" + }, + { + "name": "offers", + "type": "nbt" + } + ] + ], + "packet_update_equipment": [ + "container", + [ + { + "name": "window_id", + "type": "WindowID" + }, + { + "name": "window_type", + "type": "WindowType" + }, + { + "name": "size", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "inventory", + "type": "nbt" + } + ] + ], + "packet_resource_pack_data_info": [ + "container", + [ + { + "name": "package_id", + "type": "string" + }, + { + "name": "max_chunk_size", + "type": "lu32" + }, + { + "name": "chunk_count", + "type": "lu32" + }, + { + "name": "compressed_package_size", + "type": "lu64" + }, + { + "name": "hash", + "type": "ByteArray" + }, + { + "name": "is_premium", + "type": "bool" + }, + { + "name": "pack_type", + "type": "u8" + } + ] + ], + "packet_resource_pack_chunk_data": [ + "container", + [ + { + "name": "package_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + }, + { + "name": "progress", + "type": "lu64" + }, + { + "name": "payload", + "type": "ByteArray" + } + ] + ], + "packet_resource_pack_chunk_request": [ + "container", + [ + { + "name": "package_id", + "type": "string" + }, + { + "name": "chunk_index", + "type": "lu32" + } + ] + ], + "packet_transfer": [ + "container", + [ + { + "name": "server_address", + "type": "string" + }, + { + "name": "port", + "type": "lu16" + } + ] + ], + "packet_play_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "volume", + "type": "lf32" + }, + { + "name": "pitch", + "type": "lf32" + } + ] + ], + "packet_stop_sound": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "stop_all", + "type": "bool" + } + ] + ], + "packet_set_title": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "clear", + "1": "reset", + "2": "set_title", + "3": "set_subtitle", + "4": "action_bar_message", + "5": "set_durations", + "6": "set_title_json", + "7": "set_subtitle_json", + "8": "action_bar_message_json" + } + } + ] + }, + { + "name": "text", + "type": "string" + }, + { + "name": "fade_in_time", + "type": "zigzag32" + }, + { + "name": "stay_time", + "type": "zigzag32" + }, + { + "name": "fade_out_time", + "type": "zigzag32" + } + ] + ], + "packet_add_behavior_tree": [ + "container", + [ + { + "name": "behaviortree", + "type": "string" + } + ] + ], + "packet_structure_block_update": [ + "container", + [] + ], + "packet_show_store_offer": [ + "container", + [ + { + "name": "unknown0", + "type": "string" + }, + { + "name": "unknown1", + "type": "bool" + } + ] + ], + "packet_purchase_receipt": [ + "container", + [] + ], + "packet_player_skin": [ + "container", + [ + { + "name": "uuid", + "type": "uuid" + }, + { + "name": "skin", + "type": "Skin" + }, + { + "name": "skin_name", + "type": "string" + }, + { + "name": "old_skin_name", + "type": "string" + }, + { + "name": "is_verified", + "type": "bool" + } + ] + ], + "packet_sub_client_login": [ + "container", + [] + ], + "packet_initiate_web_socket_connection": [ + "container", + [ + { + "name": "server", + "type": "string" + } + ] + ], + "packet_set_last_hurt_by": [ + "container", + [ + { + "name": "unknown", + "type": "varint" + } + ] + ], + "packet_book_edit": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "replace_page", + "1": "add_page", + "2": "delete_page", + "3": "swap_pages", + "4": "sign" + } + } + ] + }, + { + "name": "slot", + "type": "u8" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "replace_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "add_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + }, + { + "name": "text", + "type": "string" + }, + { + "name": "photo_name", + "type": "string" + } + ] + ], + "delete_page": [ + "container", + [ + { + "name": "page_number", + "type": "u8" + } + ] + ], + "swap_pages": [ + "container", + [ + { + "name": "page1", + "type": "u8" + }, + { + "name": "page2", + "type": "u8" + } + ] + ], + "sign": [ + "container", + [ + { + "name": "title", + "type": "string" + }, + { + "name": "author", + "type": "string" + }, + { + "name": "xuid", + "type": "string" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_npc_request": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "unknown0", + "type": "u8" + }, + { + "name": "unknown1", + "type": "string" + }, + { + "name": "unknown2", + "type": "u8" + } + ] + ], + "packet_photo_transfer": [ + "container", + [ + { + "name": "file_name", + "type": "string" + }, + { + "name": "image_data", + "type": "string" + }, + { + "name": "unknown2", + "type": "string" + } + ] + ], + "packet_modal_form_request": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_modal_form_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_server_settings_request": [ + "container", + [] + ], + "packet_server_settings_response": [ + "container", + [ + { + "name": "form_id", + "type": "varint" + }, + { + "name": "data", + "type": "string" + } + ] + ], + "packet_show_profile": [ + "container", + [ + { + "name": "xuid", + "type": "string" + } + ] + ], + "packet_set_default_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + } + ] + ], + "packet_remove_objective": [ + "container", + [ + { + "name": "objective_name", + "type": "string" + } + ] + ], + "packet_set_display_objective": [ + "container", + [ + { + "name": "display_slot", + "type": "string" + }, + { + "name": "objective_name", + "type": "string" + }, + { + "name": "display_name", + "type": "string" + }, + { + "name": "criteria_name", + "type": "string" + }, + { + "name": "sort_order", + "type": "zigzag32" + } + ] + ], + "packet_set_score": [ + "container", + [ + { + "name": "entries", + "type": "ScoreEntries" + } + ] + ], + "packet_lab_table": [ + "container", + [ + { + "name": "useless_byte", + "type": "u8" + }, + { + "name": "lab_table_x", + "type": "varint" + }, + { + "name": "lab_table_y", + "type": "varint" + }, + { + "name": "lab_table_z", + "type": "varint" + }, + { + "name": "reaction_type", + "type": "u8" + } + ] + ], + "packet_update_block_synced": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "block_runtime_id", + "type": "varint" + }, + { + "name": "flags", + "type": "UpdateBlockFlags" + }, + { + "name": "layer", + "type": "varint" + }, + { + "name": "entity_unique_id", + "type": "zigzag64" + }, + { + "name": "transition_type", + "type": [ + "mapper", + { + "type": "varint64", + "mappings": { + "0": "entity", + "1": "create", + "2": "destroy" + } + } + ] + } + ] + ], + "packet_move_entity_delta": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + }, + { + "name": "flags", + "type": "DeltaMoveFlags" + }, + { + "name": "x", + "type": [ + "switch", + { + "compareTo": "flags.has_x", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "y", + "type": [ + "switch", + { + "compareTo": "flags.has_y", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "z", + "type": [ + "switch", + { + "compareTo": "flags.has_z", + "fields": { + "true": "lf32" + }, + "default": "void" + } + ] + }, + { + "name": "rot_x", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_x", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_y", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_y", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + }, + { + "name": "rot_z", + "type": [ + "switch", + { + "compareTo": "flags.has_rot_z", + "fields": { + "true": "u8" + }, + "default": "void" + } + ] + } + ] + ], + "packet_set_scoreboard_identity": [ + "container", + [ + { + "name": "entries", + "type": "ScoreboardIdentityEntries" + } + ] + ], + "packet_set_local_player_as_initialized": [ + "container", + [ + { + "name": "runtime_entity_id", + "type": "varint64" + } + ] + ], + "packet_update_soft_enum": [ + "container", + [] + ], + "packet_network_stack_latency": [ + "container", + [ + { + "name": "timestamp", + "type": "lu64" + }, + { + "name": "unknown_flag", + "type": "u8" + } + ] + ], + "packet_script_custom_event": [ + "container", + [ + { + "name": "event_name", + "type": "string" + }, + { + "name": "event_data", + "type": "string" + } + ] + ], + "packet_spawn_particle_effect": [ + "container", + [ + { + "name": "dimension_id", + "type": "u8" + }, + { + "name": "entity_id", + "type": "zigzag64" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "particle_name", + "type": "string" + } + ] + ], + "packet_available_entity_identifiers": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event_v2": [ + "container", + [ + { + "name": "sound_id", + "type": "u8" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_network_chunk_publisher_update": [ + "container", + [ + { + "name": "coordinates", + "type": "BlockCoordinates" + }, + { + "name": "radius", + "type": "varint" + } + ] + ], + "packet_biome_definition_list": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_level_sound_event": [ + "container", + [ + { + "name": "sound_id", + "type": "SoundType" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "block_id", + "type": "zigzag32" + }, + { + "name": "entity_type", + "type": "string" + }, + { + "name": "is_baby_mob", + "type": "bool" + }, + { + "name": "is_global", + "type": "bool" + } + ] + ], + "packet_level_event_generic": [ + "container", + [ + { + "name": "event_id", + "type": "varint" + }, + { + "name": "nbt", + "type": "nbtLoop" + } + ] + ], + "packet_lectern_update": [ + "container", + [ + { + "name": "page", + "type": "u8" + }, + { + "name": "page_count", + "type": "u8" + }, + { + "name": "position", + "type": "vec3i" + }, + { + "name": "drop_book", + "type": "bool" + } + ] + ], + "packet_video_stream_connect": [ + "container", + [ + { + "name": "server_uri", + "type": "string" + }, + { + "name": "frame_send_frequency", + "type": "lf32" + }, + { + "name": "action", + "type": "u8" + }, + { + "name": "resolution_x", + "type": "li32" + }, + { + "name": "resolution_y", + "type": "li32" + } + ] + ], + "packet_add_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_remove_ecs_entity": [ + "container", + [ + { + "name": "network_id", + "type": "varint64" + } + ] + ], + "packet_client_cache_status": [ + "container", + [ + { + "name": "enabled", + "type": "bool" + } + ] + ], + "packet_on_screen_texture_animation": [ + "container", + [] + ], + "packet_map_create_locked_copy": [ + "container", + [] + ], + "packet_structure_template_data_export_request": [ + "container", + [] + ], + "packet_structure_template_data_export_response": [ + "container", + [] + ], + "packet_update_block_properties": [ + "container", + [ + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_client_cache_blob_status": [ + "container", + [ + { + "name": "misses", + "type": "varint" + }, + { + "name": "haves", + "type": "varint" + }, + { + "name": "missing", + "type": [ + "array", + { + "count": "misses", + "type": "lu64" + } + ] + }, + { + "name": "have", + "type": [ + "array", + { + "count": "haves", + "type": "lu64" + } + ] + } + ] + ], + "packet_client_cache_miss_response": [ + "container", + [ + { + "name": "blobs", + "type": [ + "array", + { + "countType": "varint", + "type": "Blob" + } + ] + } + ] + ], + "packet_education_settings": [ + "container", + [ + { + "name": "CodeBuilderDefaultURI", + "type": "string" + }, + { + "name": "CodeBuilderTitle", + "type": "string" + }, + { + "name": "CanResizeCodeBuilder", + "type": "bool" + }, + { + "name": "HasOverrideURI", + "type": "bool" + }, + { + "name": "OverrideURI", + "type": [ + "switch", + { + "compareTo": "HasOverrideURI", + "fields": { + "true": "string" + }, + "default": "void" + } + ] + }, + { + "name": "HasQuiz", + "type": "bool" + } + ] + ], + "packet_multiplayer_settings": [ + "container", + [ + { + "name": "action_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "enable_multiplayer", + "1": "disable_multiplayer", + "2": "refresh_join_code" + } + } + ] + } + ] + ], + "packet_settings_command": [ + "container", + [ + { + "name": "command_line", + "type": "string" + }, + { + "name": "suppress_output", + "type": "bool" + } + ] + ], + "packet_anvil_damage": [ + "container", + [ + { + "name": "damage", + "type": "u8" + }, + { + "name": "position", + "type": "BlockCoordinates" + } + ] + ], + "packet_completed_using_item": [ + "container", + [ + { + "name": "used_item_id", + "type": "li16" + }, + { + "name": "use_method", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "0": "equip_armor", + "1": "eat", + "2": "attack", + "3": "consume", + "4": "throw", + "5": "shoot", + "6": "place", + "7": "fill_bottle", + "8": "fill_bucket", + "9": "pour_bucket", + "10": "use_tool", + "11": "interact", + "12": "retrieved", + "13": "dyed", + "14": "traded" + } + } + ] + } + ] + ], + "packet_network_settings": [ + "container", + [ + { + "name": "compression_threshold", + "type": "u16" + } + ] + ], + "packet_player_auth_input": [ + "container", + [ + { + "name": "pitch", + "type": "lf32" + }, + { + "name": "yaw", + "type": "lf32" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "move_vector", + "type": "vec2f" + }, + { + "name": "head_yaw", + "type": "lf32" + }, + { + "name": "input_data", + "type": "InputFlag" + }, + { + "name": "input_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "unknown", + "1": "mouse", + "2": "touch", + "3": "game_pad", + "4": "motion_controller" + } + } + ] + }, + { + "name": "play_mode", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "normal", + "1": "teaser", + "2": "screen", + "3": "viewer", + "4": "reality", + "5": "placement", + "6": "living_room", + "7": "exit_level", + "8": "exit_level_living_room", + "9": "num_modes" + } + } + ] + }, + { + "name": "gaze_direction", + "type": [ + "switch", + { + "compareTo": "play_mode", + "fields": { + "reality": "vec3f" + }, + "default": "void" + } + ] + }, + { + "name": "tick", + "type": "varint64" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "transaction", + "type": [ + "switch", + { + "compareTo": "input_data.item_interact", + "fields": { + "true": [ + "container", + [ + { + "name": "legacy", + "type": "TransactionLegacy" + }, + { + "name": "actions", + "type": "TransactionActions" + }, + { + "name": "data", + "type": "TransactionUseItem" + } + ] + ] + }, + "default": "void" + } + ] + }, + { + "name": "item_stack_request", + "type": [ + "switch", + { + "compareTo": "input_data.item_stack_request", + "fields": { + "true": "ItemStackRequest" + }, + "default": "void" + } + ] + }, + { + "name": "block_action", + "type": [ + "switch", + { + "compareTo": "input_data.block_action", + "fields": { + "true": [ + "array", + { + "countType": "zigzag32", + "type": [ + "container", + [ + { + "name": "action", + "type": "Action" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "action", + "fields": { + "start_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "abort_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "crack_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "predict_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ], + "continue_break": [ + "container", + [ + { + "name": "position", + "type": "BlockCoordinates" + }, + { + "name": "face", + "type": "zigzag32" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ] + } + ] + }, + "default": "void" + } + ] + } + ] + ], + "packet_creative_content": [ + "container", + [ + { + "name": "items", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "entry_id", + "type": "varint" + }, + { + "name": "item", + "type": "ItemLegacy" + } + ] + ] + } + ] + } + ] + ], + "packet_player_enchant_options": [ + "container", + [ + { + "name": "enchant_options", + "type": "EnchantOptions" + } + ] + ], + "packet_item_stack_request": [ + "container", + [ + { + "name": "requests", + "type": [ + "array", + { + "countType": "varint", + "type": "ItemStackRequest" + } + ] + } + ] + ], + "packet_item_stack_response": [ + "container", + [ + { + "name": "responses", + "type": "ItemStackResponses" + } + ] + ], + "packet_player_armor_damage": [ + "container", + [ + { + "name": "type", + "type": "ArmorDamageType" + }, + { + "name": "helmet_damage", + "type": [ + "switch", + { + "compareTo": "type.head", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "chestplate_damage", + "type": [ + "switch", + { + "compareTo": "type.chest", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "leggings_damage", + "type": [ + "switch", + { + "compareTo": "type.legs", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + }, + { + "name": "boots_damage", + "type": [ + "switch", + { + "compareTo": "type.feet", + "fields": { + "true": "zigzag32" + }, + "default": "void" + } + ] + } + ] + ], + "packet_update_player_game_type": [ + "container", + [ + { + "name": "gamemode", + "type": "GameMode" + }, + { + "name": "player_unique_id", + "type": "zigzag64" + } + ] + ], + "packet_position_tracking_db_request": [ + "container", + [ + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "query" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + } + ] + ], + "packet_position_tracking_db_broadcast": [ + "container", + [ + { + "name": "broadcast_action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "update", + "1": "destory", + "2": "not_found" + } + } + ] + }, + { + "name": "tracking_id", + "type": "zigzag32" + }, + { + "name": "nbt", + "type": "nbt" + } + ] + ], + "packet_packet_violation_warning": [ + "container", + [ + { + "name": "violation_type", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "malformed" + } + } + ] + }, + { + "name": "severity", + "type": [ + "mapper", + { + "type": "zigzag32", + "mappings": { + "0": "warning", + "1": "final_warning", + "2": "terminating" + } + } + ] + }, + { + "name": "packet_id", + "type": "zigzag32" + }, + { + "name": "reason", + "type": "string" + } + ] + ], + "packet_motion_prediction_hints": [ + "container", + [ + { + "name": "entity_runtime_id", + "type": "varint64" + }, + { + "name": "velocity", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + } + ] + ], + "packet_animate_entity": [ + "container", + [ + { + "name": "animation", + "type": "string" + }, + { + "name": "next_state", + "type": "string" + }, + { + "name": "stop_condition", + "type": "string" + }, + { + "name": "controller", + "type": "string" + }, + { + "name": "blend_out_time", + "type": "lf32" + }, + { + "name": "runtime_entity_ids", + "type": [ + "array", + { + "countType": "varint", + "type": "varint64" + } + ] + } + ] + ], + "packet_camera_shake": [ + "container", + [ + { + "name": "intensity", + "type": "lf32" + }, + { + "name": "duration", + "type": "lf32" + }, + { + "name": "type", + "type": "u8" + }, + { + "name": "action", + "type": [ + "mapper", + { + "type": "u8", + "mappings": { + "0": "add", + "1": "stop" + } + } + ] + } + ] + ], + "packet_player_fog": [ + "container", + [ + { + "name": "stack", + "type": [ + "array", + { + "countType": "varint", + "type": "string" + } + ] + } + ] + ], + "packet_correct_player_move_prediction": [ + "container", + [ + { + "name": "position", + "type": "vec3f" + }, + { + "name": "delta", + "type": "vec3f" + }, + { + "name": "on_ground", + "type": "bool" + }, + { + "name": "tick", + "type": "varint64" + } + ] + ], + "packet_item_component": [ + "container", + [ + { + "name": "entries", + "type": "ItemComponentList" + } + ] + ], + "packet_filter_text_packet": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "from_server", + "type": "bool" + } + ] + ], + "packet_debug_renderer": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "li32", + "mappings": { + "1": "clear", + "2": "add_cube" + } + } + ] + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "clear": "void", + "add_cube": [ + "container", + [ + { + "name": "text", + "type": "string" + }, + { + "name": "position", + "type": "vec3f" + }, + { + "name": "red", + "type": "lf32" + }, + { + "name": "green", + "type": "lf32" + }, + { + "name": "blue", + "type": "lf32" + }, + { + "name": "alpha", + "type": "lf32" + }, + { + "name": "duration", + "type": "li64" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], + "string": [ + "pstring", + { + "countType": "varint" + } + ], + "ByteArray": [ + "buffer", + { + "countType": "varint" + } + ], + "SignedByteArray": [ + "buffer", + { + "countType": "zigzag32" + } + ], + "LittleString": [ + "pstring", + { + "countType": "li32" + } + ], + "ShortArray": [ + "buffer", + { + "countType": "li16" + } + ], + "MetadataFlags1": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "onfire", + "sneaking", + "riding", + "sprinting", + "action", + "invisible", + "tempted", + "inlove", + "saddled", + "powered", + "ignited", + "baby", + "converting", + "critical", + "can_show_nametag", + "always_show_nametag", + "no_ai", + "silent", + "wallclimbing", + "can_climb", + "swimmer", + "can_fly", + "walker", + "resting", + "sitting", + "angry", + "interested", + "charged", + "tamed", + "orphaned", + "leashed", + "sheared", + "gliding", + "elder", + "moving", + "breathing", + "chested", + "stackable", + "showbase", + "rearing", + "vibrating", + "idling", + "evoker_spell", + "charge_attack", + "wasd_controlled", + "can_power_jump", + "linger", + "has_collision", + "affected_by_gravity", + "fire_immune", + "dancing", + "enchanted", + "show_trident_rope", + "container_private", + "transforming", + "spin_attack", + "swimming", + "bribed", + "pregnant", + "laying_egg", + "rider_can_pick", + "transition_sitting", + "eating", + "laying_down" + ] + } + ], + "MetadataFlags2": [ + "bitflags", + { + "type": "zigzag64", + "big": true, + "flags": [ + "sneezing", + "trusting", + "rolling", + "scared", + "in_scaffolding", + "over_scaffolding", + "fall_through_scaffolding", + "blocking", + "transition_blocking", + "blocked_using_shield", + "blocked_using_damaged_shield", + "sleeping", + "wants_to_wake", + "trade_interest", + "door_breaker", + "breaking_obstruction", + "door_opener", + "illager_captain", + "stunned", + "roaring", + "delayed_attacking", + "avoiding_mobs", + "avoiding_block", + "facing_target_to_range_attack", + "hidden_when_invisible", + "is_in_ui", + "stalking", + "emoting", + "celebrating", + "admiring", + "celebrating_special" + ] + } + ], + "UpdateBlockFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "neighbors": 1, + "network": 2, + "no_graphic": 4, + "unused": 8, + "priority": 16 + } + } + ], + "AdventureFlags": [ + "bitflags", + { + "type": "varint", + "flags": { + "world_immutable": 1, + "no_pvp": 2, + "auto_jump": 32, + "allow_flight": 64, + "no_clip": 128, + "world_builder": 256, + "flying": 512, + "muted": 1024 + } + } + ], + "ActionPermissions": [ + "bitflags", + { + "type": "varint", + "flags": { + "mine": 65537, + "doors_and_switches": 65538, + "open_containers": 65540, + "attack_players": 65544, + "attack_mobs": 65552, + "operator": 65568, + "teleport": 65664, + "build": 65792, + "default": 66048 + } + } + ], + "CommandFlags": [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "has_semantic_constraint", + "size": 1, + "signed": false + }, + { + "name": "collapse_enum", + "size": 1, + "signed": false + } + ] + ], + "DeltaMoveFlags": [ + "bitflags", + { + "type": "lu16", + "flags": { + "has_x": 1, + "has_y": 2, + "has_z": 4, + "has_rot_x": 8, + "has_rot_y": 16, + "has_rot_z": 32, + "on_ground": 64, + "teleport": 128, + "force_move": 256 + } + } + ], + "InputFlag": [ + "bitflags", + { + "type": "varint64", + "big": true, + "flags": [ + "ascend", + "descend", + "north_jump", + "jump_down", + "sprint_down", + "change_height", + "jumping", + "auto_jumping_in_water", + "sneaking", + "sneak_down", + "up", + "down", + "left", + "right", + "up_left", + "up_right", + "want_up", + "want_down", + "want_down_slow", + "want_up_slow", + "sprinting", + "ascend_scaffolding", + "descend_scaffolding", + "sneak_toggle_down", + "persist_sneak", + "start_sprinting", + "stop_sprinting", + "start_sneaking", + "stop_sneaking", + "start_swimming", + "stop_swimming", + "start_jumping", + "start_gliding", + "stop_gliding", + "item_interact", + "block_action", + "item_stack_request" + ] + } + ], + "ArmorDamageType": [ + "bitflags", + { + "type": "u8", + "flags": { + "head": 1, + "chest": 2, + "legs": 4, + "feet": 8 + } + } + ] + } +} \ No newline at end of file diff --git a/data/latest/proto.yml b/data/latest/proto.yml index e46463d..da3a9e1 100644 --- a/data/latest/proto.yml +++ b/data/latest/proto.yml @@ -1,13 +1,14 @@ # Created from MiNET and gophertunnel docs # The version below is the latest version this protocol schema was updated for. # The output protocol.json will be in the folder for the version -!version: 1.16.210 +!version: 1.16.220 # Some ProtoDef aliases string: ["pstring",{"countType":"varint"}] ByteArray: ["buffer",{"countType":"varint"}] SignedByteArray: ["buffer",{"countType":"zigzag32"}] LittleString: ["pstring",{"countType":"li32"}] +ShortArray: ["buffer",{"countType":"li16"}] varint32: varint bool: native zigzag32: native @@ -622,17 +623,45 @@ packet_level_event: 1060: sound_armor_stand_break 1061: sound_armor_stand_hit 1062: sound_armor_stand_fall - 1063: sound_armor_stand_place + 1063: sound_armor_stand_place + 1064: pointed_dripstone_land + 1065: dye_used + 1066: ink_sack_used 2000: particle_shoot #TODO: check 2000-2017 2001: particle_destroy 2002: particle_splash 2003: particle_eye_despawn 2004: particle_spawn - 2006: guardian_curse + 2005: particle_crop_growth + 2006: particle_guardian_curse + 2007: particle_death_smoke 2008: particle_block_force_field - 2009: particle_projectile_hit + 2009: particle_projectile_hit + 2010: particle_dragon_egg_teleport + 2011: particle_crop_eaten + 2012: particle_critical 2013: particle_enderman_teleport - 2014: particle_punch_block + 2014: particle_punch_block + 2015: particle_bubble + 2016: particle_evaporate + 2017: particle_destroy_armor_stand + 2018: particle_breaking_egg + 2019: particle_destroy_egg + 2020: particle_evaporate_water + 2021: particle_destroy_block_no_sound + 2022: particle_knockback_roar + 2023: particle_teleport_trail + 2024: particle_point_cloud + 2025: particle_explosion + 2026: particle_block_explosion + 2027: particle_vibration_signal + 2028: particle_dripstone_drip + 2029: particle_fizz_effect + 2030: particle_wax_on + 2031: particle_wax_off + 2032: particle_scrape + 2033: particle_electric_spark + 3001: start_rain 3002: start_thunder 3003: stop_rain @@ -966,7 +995,7 @@ packet_inventory_slot: slot: varint # NewItem is the item to be put in the slot at Slot. It will overwrite any item that may currently # be present in that slot. - item: ItemStack + item: Item # ContainerSetData is sent by the server to update specific data of a single container, meaning a block such # as a furnace or a brewing stand. This data is usually used by the client to display certain features @@ -1385,6 +1414,8 @@ packet_available_commands: constraints: []varint constraint: u8 => 0: cheats_enabled + 1: operator_permissions + 2: host_permissions # ParamOptionCollapseEnum specifies if the enum (only if the Type is actually an enum type. If not, # setting this to true has no effect) should be collapsed. This means that the options of the enum are @@ -1878,10 +1909,14 @@ packet_biome_definition_list: !bound: client nbt: nbt +# LevelSoundEvent is sent by the server to make any kind of built-in sound heard to a player. It is sent to, +# for example, play a stepping sound or a shear sound. The packet is also sent by the client, in which case +# it could be forwarded by the server to the other players online. If possible, the packets from the client +# should be ignored however, and the server should play them on its own accord. packet_level_sound_event: !id: 0x7b !bound: both - sound_id: varint + sound_id: SoundType position: vec3f block_id: zigzag32 entity_type: string @@ -2210,7 +2245,9 @@ InputFlag: [ "bitflags", { packet_creative_content: !id: 0x91 !bound: client - items: ItemStacks + items: []varint + entry_id: varint + item: ItemLegacy packet_player_enchant_options: !id: 0x92 diff --git a/data/latest/types.yaml b/data/latest/types.yaml index 7d85243..d633c70 100644 --- a/data/latest/types.yaml +++ b/data/latest/types.yaml @@ -75,25 +75,72 @@ Itemstates: []varint runtime_id: li16 component_based: bool +# Start of item crap ... + +ItemExtraDataWithBlockingTick: + has_nbt: lu16 => + 0xffff: 'true' + 0x0000: 'false' + nbt: has_nbt ? + if true: + version: u8 + nbt: lnbt + default: void + can_place_on: ShortArray[]li32 + can_destroy: ShortArray[]li32 + blocking_tick: li64 + +ItemExtraDataWithoutBlockingTick: + has_nbt: lu16 => + 0xffff: 'true' + 0x0000: 'false' + nbt: has_nbt ? + if true: + version: u8 + nbt: lnbt + default: void + can_place_on: ShortArray[]li32 + can_destroy: ShortArray[]li32 + +# Same as below but without a "networkStackID" boolean ... +ItemLegacy: + network_id: zigzag32 + _: network_id? + if 0: void + default: + count: lu16 + metadata: varint + block_runtime_id: zigzag32 + extra: network_id ? + if 355: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]' + default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]' + +# An "ItemStack" here represents an Item instance. You can think about it like a pointer +# to an item class. The data for the class gets updated with the data in the `item` field +# As of 1.16.220, now functionally the same as `Item` just without an extra boolean when +# server auth inventories is disabled. Item: network_id: zigzag32 _: network_id? if 0: void default: - auxiliary_value: zigzag32 - has_nbt: lu16 => - 0xffff: 'true' - 0x0000: 'false' - nbt: has_nbt? - if true: - version: u8 - nbt: nbt - default: void - can_place_on: string[]zigzag32 - can_destroy: string[]zigzag32 - _: network_id? - if 355: - blocking_tick: zigzag64 + count: lu16 + metadata: varint + # When server authoritative inventory is enabled, all allocated items have a unique ID used to identify + # a specifc item instance. + has_stack_id: u8 + # StackNetworkID is the network ID of the item stack. If the stack is empty, 0 is always written for this + # field. If not, the field should be set to 1 if the server authoritative inventories are disabled in the + # StartGame packet, or to a unique stack ID if it is enabled. + stack_id: has_stack_id ? + if 0: void + default: zigzag32 + block_runtime_id: zigzag32 + extra: network_id ? + if 355: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithBlockingTick" }]' + default: '["encapsulated", { "lengthType": "varint", "type": "ItemExtraDataWithoutBlockingTick" }]' + +# end of item crap vec3i: x: zigzag32 @@ -413,7 +460,7 @@ TransactionUseItem: 2: break_block # BlockPosition is the position of the block that was interacted with. This is only really a correct # block position if ActionType is not UseItemActionClickAir. - block_position: BlockCoordinates + block_position: vec3i # BlockFace is the face of the block that was interacted with. When clicking the block, it is the face # clicked. When breaking the block, it is the face that was last being hit until the block broke. face: varint @@ -438,7 +485,6 @@ TransactionUseItem: # all of these actions results in a balanced inventory transaction. This should be checked to ensure that # no items are cheated into the inventory. TransactionActions: - network_ids: bool actions: []varint source_type: varint => 0: container @@ -458,9 +504,6 @@ TransactionActions: slot: varint old_item: Item new_item: Item - new_item_stack_id: ../network_ids? - if true: zigzag32 - default: void # The Minecraft bedrock inventory system was refactored, but not all inventory actions use the new packet. # This data structure holds actions that have not been updated to the new system. @@ -542,17 +585,7 @@ Transaction: # mainly for purposes such as spawning eating particles at that position. head_pos: vec3f -# An "ItemStack" here represents an Item instance. You can think about it like a pointer -# to an item class. The data for the class gets updated with the data in the `item` field -ItemStack: - # StackNetworkID is the network ID of the item stack. If the stack is empty, 0 is always written for this - # field. If not, the field should be set to 1 if the server authoritative inventories are disabled in the - # StartGame packet, or to a unique stack ID if it is enabled. - stack_id: varint - # Stack is the actual item stack of the item instance. - item: Item - -ItemStacks: ItemStack[]varint +ItemStacks: Item[]varint RecipeIngredient: network_id: zigzag32 @@ -591,7 +624,7 @@ Recipes: []varint if shapeless or shulker_box or shapeless_chemistry: recipe_id: string input: RecipeIngredient[]varint - output: Item[]varint + output: ItemLegacy[]varint uuid: uuid block: string priority: zigzag32 @@ -604,19 +637,19 @@ Recipes: []varint # RecipeIngredient[$height][$width] or RecipeIngredient[]$height[]$width ? input: []$width _: RecipeIngredient[]$height - output: Item[]varint + output: ItemLegacy[]varint uuid: uuid block: string priority: zigzag32 network_id: varint if furnace: input_id: zigzag32 - output: Item + output: ItemLegacy block: string if furnace_with_metadata: input_id: zigzag32 input_meta: zigzag32 - output: Item + output: ItemLegacy block: string if multi: uuid: uuid @@ -889,7 +922,7 @@ ItemStackRequest: filtered_string_index: li32 if non_implemented: void if results_deprecated: - result_items: Item[]varint + result_items: ItemLegacy[]varint times_crafted: u8 # CustomNames is a list of custom names involved in the request. This is typically filled with one string # when an anvil is used. @@ -959,6 +992,10 @@ CommandOrigin: 9: virtual 10: game_argument 11: entity_server + 12: precompiled + 13: game_director_entity_server # ? + 14: script + # UUID is the UUID of the command called. This UUID is a bit odd as it is not specified by the server. It # is not clear what exactly this UUID is meant to identify, but it is unique for each command called. uuid: uuid @@ -1135,6 +1172,344 @@ ContainerSlotType: u8 => - cursor - creative_output +SoundType: varint => + - ItemUseOn + - Hit + - Step + - Fly + - Jump + - Break + - Place + - HeavyStep + - Gallop + - Fall + - Ambient + - AmbientBaby + - AmbientInWater + - Breathe + - Death + - DeathInWater + - DeathToZombie + - Hurt + - HurtInWater + - Mad + - Boost + - Bow + - SquishBig + - SquishSmall + - FallBig + - FallSmall + - Splash + - Fizz + - Flap + - Swim + - Drink + - Eat + - Takeoff + - Shake + - Plop + - Land + - Saddle + - Armor + - MobArmorStandPlace + - AddChest + - Throw + - Attack + - AttackNoDamage + - AttackStrong + - Warn + - Shear + - Milk + - Thunder + - Explode + - Fire + - Ignite + - Fuse + - Stare + - Spawn + - Shoot + - BreakBlock + - Launch + - Blast + - LargeBlast + - Twinkle + - Remedy + - Infect + - LevelUp + - BowHit + - BulletHit + - ExtinguishFire + - ItemFizz + - ChestOpen + - ChestClosed + - ShulkerBoxOpen + - ShulkerBoxClosed + - EnderChestOpen + - EnderChestClosed + - PowerOn + - PowerOff + - Attach + - Detach + - Deny + - Tripod + - Pop + - DropSlot + - Note + - Thorns + - PistonIn + - PistonOut + - Portal + - Water + - LavaPop + - Lava + - Burp + - BucketFillWater + - BucketFillLava + - BucketEmptyWater + - BucketEmptyLava + - ArmorEquipChain + - ArmorEquipDiamond + - ArmorEquipGeneric + - ArmorEquipGold + - ArmorEquipIron + - ArmorEquipLeather + - ArmorEquipElytra + - Record13 + - RecordCat + - RecordBlocks + - RecordChirp + - RecordFar + - RecordMall + - RecordMellohi + - RecordStal + - RecordStrad + - RecordWard + - Record11 + - RecordWait + - unknown1 + - Flop + - ElderGuardianCurse + - MobWarning + - MobWarningBaby + - Teleport + - ShulkerOpen + - ShulkerClose + - Haggle + - HaggleYes + - HaggleNo + - HaggleIdle + - ChorusGrow + - ChorusDeath + - Glass + - PotionBrewed + - CastSpell + - PrepareAttack + - PrepareSummon + - PrepareWololo + - Fang + - Charge + - CameraTakePicture + - LeashKnotPlace + - LeashKnotBreak + - Growl + - Whine + - Pant + - Purr + - Purreow + - DeathMinVolume + - DeathMidVolume + - unknown2 + - ImitateCaveSpider + - ImitateCreeper + - ImitateElderGuardian + - ImitateEnderDragon + - ImitateEnderman + - unknown3 + - ImitateEvocationIllager + - ImitateGhast + - ImitateHusk + - ImitateIllusionIllager + - ImitateMagmaCube + - ImitatePolarBear + - ImitateShulker + - ImitateSilverfish + - ImitateSkeleton + - ImitateSlime + - ImitateSpider + - ImitateStray + - ImitateVex + - ImitateVindicationIllager + - ImitateWitch + - ImitateWither + - ImitateWitherSkeleton + - ImitateWolf + - ImitateZombie + - ImitateZombiePigman + - ImitateZombieVillager + - BlockEndPortalFrameFill + - BlockEndPortalSpawn + - RandomAnvilUse + - BottleDragonBreath + - PortalTravel + - ItemTridentHit + - ItemTridentReturn + - ItemTridentRiptide1 + - ItemTridentRiptide2 + - ItemTridentRiptide3 + - ItemTridentThrow + - ItemTridentThunder + - ItemTridentHitGround + - Default + - BlockFletchingTableUse + - ElemConstructOpen + - IceBombHit + - BalloonPop + - LtReactionIceBomb + - LtReactionBleach + - LtReactionEPaste + - LtReactionEPaste2 + - LtReactionFertilizer + - LtReactionFireball + - LtReactionMgsalt + - LtReactionMiscfire + - LtReactionFire + - LtReactionMiscexplosion + - LtReactionMiscmystical + - LtReactionMiscmystical2 + - LtReactionProduct + - SparklerUse + - GlowstickUse + - SparklerActive + - ConvertToDrowned + - BucketFillFish + - BucketEmptyFish + - BubbleUp + - BubbleDown + - BubblePop + - BubbleUpInside + - BubbleDownInside + - HurtBaby + - DeathBaby + - StepBaby + - BabySpawn + - Born + - BlockTurtleEggBreak + - BlockTurtleEggCrack + - BlockTurtleEggHatch + - TurtleLayEgg + - BlockTurtleEggAttack + - BeaconActivate + - BeaconAmbient + - BeaconDeactivate + - BeaconPower + - ConduitActivate + - ConduitAmbient + - ConduitAttack + - ConduitDeactivate + - ConduitShort + - Swoop + - BlockBambooSaplingPlace + - PreSneeze + - Sneeze + - AmbientTame + - Scared + - BlockScaffoldingClimb + - CrossbowLoadingStart + - CrossbowLoadingMiddle + - CrossbowLoadingEnd + - CrossbowShoot + - CrossbowQuickChargeStart + - CrossbowQuickChargeMiddle + - CrossbowQuickChargeEnd + - AmbientAggressive + - AmbientWorried + - CantBreed + - ItemShieldBlock + - ItemBookPut + - BlockGrindstoneUse + - BlockBellHit + - BlockCampfireCrackle + - Roar + - Stun + - BlockSweetBerryBushHurt + - BlockSweetBerryBushPick + - UICartographyTableTakeResult + - UIStoneCutterTakeResult + - BlockComposterEmpty + - BlockComposterFill + - BlockComposterFillSuccess + - BlockComposterReady + - BlockBarrelOpen + - BlockBarrelClose + - RaidHorn + - BlockLoomUse + - AmbientRaid + - UICartographyTableUse + - UIStoneCutterUse + - UILoomUse + - SmokerUse + - BlastFurnaceUse + - SmithingTableUse + - Screech + - Sleep + - FurnaceUse + - MooshroomConvert + - MilkSuspiciously + - Celebrate + - JumpPrevent + - AmbientPollinate + - BeeHiveDrip + - BeeHiveEnter + - BeeHiveExit + - BeeHiveWork + - BeeHiveShear + - HoneyBottleDrink + - AmbientCave + - Retreat + - ConvertToZombified + - Admire + - StepLava + - Tempt + - Panic + - Angry + - AmbientWarpedForest + - AmbientSoulsandValley + - AmbientNetherWastes + - AmbientBasaltDeltas + - AmbientCrimsonForest + - RespawnAnchorCharge + - RespawnAnchorDeplete + - RespawnAnchorSetSpawn + - RespawnAnchorAmbient + - SoulEscapeQuiet + - SoulEscapeLoud + - RecordPigstep + - LinkCompassToLodestone + - BlockSmithingTableUse + - EquipNetherite + - AmbientLoopWarpedForest + - AmbientLoopSoulsandValley + - AmbientLoopNetherWastes + - AmbientLoopBasaltDeltas + - AmbientLoopCrimsonForest + - AmbientAdditionWarpedForest + - AmbientAdditionSoulsandValley + - AmbientAdditionNetherWastes + - AmbientAdditionBasaltDeltas + - AmbientAdditionCrimsonForest + - SculkSensorPowerOn + - SculkSensorPowerOff + - BucketFillPowderSnow + - BucketEmptyPowderSnow + - PointedDripstoneCauldronDripWater + - PointedDripstoneCauldronDripLava + - PointedDripstoneDripWater + - PointedDripstoneDripLava + - CaveVinesPickBerries + - BigDripleafTiltDown + - BigDripleafTiltUp + - Undefined + # TODO: remove? LegacyEntityType: li32 => 10: chicken diff --git a/package.json b/package.json index e6371bd..cea9e9d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bedrock-protocol", "version": "3.0.0", - "description": "Parse and serialize Minecraft Bedrock Edition packets", + "description": "Minecraft Bedrock Edition protocol library", "main": "index.js", "scripts": { "build": "cd tools && node compileProtocol.js", @@ -15,6 +15,7 @@ }, "keywords": [ "minecraft", + "bedrock", "pocket-edition", "protocol" ], @@ -24,27 +25,25 @@ "@jsprismarine/jsbinaryutils": "^2.1.8", "@xboxreplay/xboxlive-auth": "^3.3.3", "asn1": "^0.2.4", - "browserify-cipher": "^1.0.1", - "bedrock-provider": "^1.0.0", "debug": "^4.3.1", "ec-pem": "^0.18.0", "jsonwebtoken": "^8.5.1", "jsp-raknet": "github:extremeheat/raknet#client", - "leveldb-zlib": "0.0.26", "minecraft-folder-path": "^1.1.0", "node-fetch": "^2.6.1", "prismarine-nbt": "^1.5.0", "protodef": "^1.11.0", - "raknet-native": "^1.0.0", + "raknet-native": "^1.0.1", "uuid-1345": "^1.0.2" }, "devDependencies": { "@babel/eslint-parser": "^7.13.10", + "bedrock-provider": "^1.0.0", "babel-eslint": "^10.1.0", - "buffer-equal": "^1.0.0", "mocha": "^8.3.2", - "protodef-yaml": "^1.0.2", + "protodef-yaml": "^1.0.3", "standard": "^16.0.3", + "leveldb-zlib": "0.0.26", "bedrock-protocol": "file:." }, "standard": { diff --git a/src/connection.js b/src/connection.js index f4476bc..a13872a 100644 --- a/src/connection.js +++ b/src/connection.js @@ -2,7 +2,7 @@ const BinaryStream = require('@jsprismarine/jsbinaryutils').default const BatchPacket = require('./datatypes/BatchPacket') const cipher = require('./transforms/encryption') const { EventEmitter } = require('events') -const Versions = require('./options') +const { Versions } = require('./options') const debug = require('debug')('minecraft-protocol') const SKIP_BATCH = ['level_chunk', 'client_cache_blob_status', 'client_cache_miss_response'] @@ -29,19 +29,11 @@ class Connection extends EventEmitter { } versionLessThan (version) { - if (typeof version === 'string') { - return Versions[version] < this.options.protocolVersion - } else { - return version < this.options.protocolVersion - } + return this.options.protocolVersion < (typeof version === 'string' ? Versions[version] : version) } versionGreaterThan (version) { - if (typeof version === 'string') { - return Versions[version] > this.options.protocolVersion - } else { - return version > this.options.protocolVersion - } + return this.options.protocolVersion > (typeof version === 'string' ? Versions[version] : version) } startEncryption (iv) { diff --git a/src/datatypes/compiler-minecraft.js b/src/datatypes/compiler-minecraft.js index dd3afe3..6838a84 100644 --- a/src/datatypes/compiler-minecraft.js +++ b/src/datatypes/compiler-minecraft.js @@ -36,28 +36,48 @@ SizeOf.restBuffer = ['native', (value) => { return value.length }] +/** + * Encapsulated data with length prefix + */ +Read.encapsulated = ['parametrizable', (compiler, { lengthType, type }) => { + return compiler.wrapCode(` + const payloadSize = ${compiler.callType(lengthType, 'offset')} + const { value, size } = ctx.${type}(buffer, offset + payloadSize.size) + return { value, size: size + payloadSize.size } +`.trim()) +}] +Write.encapsulated = ['parametrizable', (compiler, { lengthType, type }) => { + return compiler.wrapCode(` + const buf = Buffer.allocUnsafe(buffer.length - offset) + const payloadSize = (ctx.${type})(value, buf, 0) + let size = (ctx.${lengthType})(payloadSize, buffer, offset) + size += buf.copy(buffer, size, 0, payloadSize) + return size +`.trim()) +}] +SizeOf.encapsulated = ['parametrizable', (compiler, { lengthType, type }) => { + return compiler.wrapCode(` + const payloadSize = (ctx.${type})(value) + return (ctx.${lengthType})(payloadSize) + payloadSize +`.trim()) +}] + /** * Read NBT until end of buffer or \0 */ Read.nbtLoop = ['context', (buffer, offset) => { const values = [] while (buffer[offset] != 0) { - // console.log('offs',offset, buffer.length,buffer.slice(offset)) const n = ctx.nbt(buffer, offset) - // console.log('read',n) values.push(n.value) offset += n.size } - // console.log('Ext',offset, buffer.length,buffer.slice(offset)) return { value: values, size: buffer.length - offset } }] Write.nbtLoop = ['context', (value, buffer, offset) => { for (const val of value) { - // console.log('val',val,offset) offset = ctx.nbt(val, buffer, offset) } - // offset += 1 - // console.log('writing 0', offset) buffer.writeUint8(0, offset) return offset + 1 }] @@ -76,6 +96,10 @@ Read.nbt = ['native', minecraft.nbt[0]] Write.nbt = ['native', minecraft.nbt[1]] SizeOf.nbt = ['native', minecraft.nbt[2]] +Read.lnbt = ['native', minecraft.lnbt[0]] +Write.lnbt = ['native', minecraft.lnbt[1]] +SizeOf.lnbt = ['native', minecraft.lnbt[2]] + /** * Bits */ @@ -84,7 +108,7 @@ Read.bitflags = ['parametrizable', (compiler, { type, flags, shift, big }) => { let fstr = JSON.stringify(flags) if (Array.isArray(flags)) { fstr = '{' - flags.map((v,k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) + flags.map((v, k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) fstr += '}' } else if (shift) { fstr = '{' @@ -106,7 +130,7 @@ Write.bitflags = ['parametrizable', (compiler, { type, flags, shift, big }) => { let fstr = JSON.stringify(flags) if (Array.isArray(flags)) { fstr = '{' - flags.map((v,k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) + flags.map((v, k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) fstr += '}' } else if (shift) { fstr = '{' @@ -127,7 +151,7 @@ SizeOf.bitflags = ['parametrizable', (compiler, { type, flags, shift, big }) => let fstr = JSON.stringify(flags) if (Array.isArray(flags)) { fstr = '{' - flags.map((v,k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) + flags.map((v, k) => fstr += `"${v}": ${big ? 1n << BigInt(k) : 1 << k}` + (big ? 'n,' : ',')) fstr += '}' } else if (shift) { fstr = '{' diff --git a/src/datatypes/minecraft.js b/src/datatypes/minecraft.js index 9ca4920..ae5d324 100644 --- a/src/datatypes/minecraft.js +++ b/src/datatypes/minecraft.js @@ -2,7 +2,8 @@ const nbt = require('prismarine-nbt') const UUID = require('uuid-1345') -const proto = nbt.protos.littleVarint +const protoLE = nbt.protos.little +const protoLEV = nbt.protos.littleVarint // TODO: deal with this: const zigzag = require('prismarine-nbt/compiler-zigzag') @@ -20,16 +21,32 @@ function writeUUID (value, buffer, offset) { return offset + 16 } +// Little Endian + varints + function readNbt (buffer, offset) { - return proto.read(buffer, offset, 'nbt') + return protoLEV.read(buffer, offset, 'nbt') } function writeNbt (value, buffer, offset) { - return proto.write(value, buffer, offset, 'nbt') + return protoLEV.write(value, buffer, offset, 'nbt') } function sizeOfNbt (value) { - return proto.sizeOf(value, 'nbt') + return protoLEV.sizeOf(value, 'nbt') +} + +// Little Endian + +function readNbtLE (buffer, offset) { + return protoLE.read(buffer, offset, 'nbt') +} + +function writeNbtLE (value, buffer, offset) { + return protoLE.write(value, buffer, offset, 'nbt') +} + +function sizeOfNbtLE (value) { + return protoLE.sizeOf(value, 'nbt') } function readEntityMetadata (buffer, offset, _ref) { @@ -131,6 +148,7 @@ function sizeOfEndOfArray (value, typeArgs) { module.exports = { uuid: [readUUID, writeUUID, 16], nbt: [readNbt, writeNbt, sizeOfNbt], + lnbt: [readNbtLE, writeNbtLE, sizeOfNbtLE], entityMetadataLoop: [readEntityMetadata, writeEntityMetadata, sizeOfEntityMetadata], ipAddress: [readIpAddress, writeIpAddress, 4], endOfArray: [readEndOfArray, writeEndOfArray, sizeOfEndOfArray], diff --git a/src/options.js b/src/options.js index 1c9e978..8750697 100644 --- a/src/options.js +++ b/src/options.js @@ -1,9 +1,10 @@ // Minimum supported version (< will be kicked) const MIN_VERSION = '1.16.201' // Currently supported verson -const CURRENT_VERSION = '1.16.210' +const CURRENT_VERSION = '1.16.220' const Versions = { + '1.16.220': 431, '1.16.210': 428, '1.16.201': 422 } diff --git a/src/transforms/encryption.js b/src/transforms/encryption.js index 1d4d294..56dfc44 100644 --- a/src/transforms/encryption.js +++ b/src/transforms/encryption.js @@ -1,28 +1,26 @@ const { Transform } = require('readable-stream') const crypto = require('crypto') const Zlib = require('zlib') -if (globalThis.isElectron) var { CipherCFB8 } = require('raknet-native') // eslint-disable-line +if (globalThis.isElectron) var { CipherGCM, CipherCFB8 } = require('raknet-native') // eslint-disable-line -const CIPHER_ALG = 'aes-256-cfb8' - -function createCipher (secret, initialValue) { - if (crypto.getCiphers().includes(CIPHER_ALG)) { - return crypto.createCipheriv(CIPHER_ALG, secret, initialValue) +function createCipher (secret, initialValue, cipherAlgorithm) { + if (crypto.getCiphers().includes(cipherAlgorithm)) { + return crypto.createCipheriv(cipherAlgorithm, secret, initialValue) } return new Cipher(secret, initialValue) } -function createDecipher (secret, initialValue) { - if (crypto.getCiphers().includes(CIPHER_ALG)) { - return crypto.createDecipheriv(CIPHER_ALG, secret, initialValue) +function createDecipher (secret, initialValue, cipherAlgorithm) { + if (crypto.getCiphers().includes(cipherAlgorithm)) { + return crypto.createDecipheriv(cipherAlgorithm, secret, initialValue) } return new Decipher(secret, initialValue) } class Cipher extends Transform { - constructor (secret, iv) { + constructor (gcm, secret, iv) { super() - this.aes = new CipherCFB8(secret, iv) + this.aes = gcm ? new CipherGCM(secret, iv) : new CipherCFB8(secret, iv) } _transform (chunk, enc, cb) { @@ -32,9 +30,9 @@ class Cipher extends Transform { } class Decipher extends Transform { - constructor (secret, iv) { + constructor (gcm, secret, iv) { super() - this.aes = new CipherCFB8(secret, iv) + this.aes = gcm ? new CipherGCM(secret, iv) : new CipherCFB8(secret, iv) } _transform (chunk, enc, cb) { @@ -54,7 +52,11 @@ function computeCheckSum (packetPlaintext, sendCounter, secretKeyBytes) { } function createEncryptor (client, iv) { - client.cipher = createCipher(client.secretKeyBytes, iv) + if (client.versionLessThan('1.16.220')) { + client.cipher = createCipher(client.secretKeyBytes, iv, 'aes-256-cfb8') + } else { + client.cipher = createCipher(client.secretKeyBytes, iv.slice(0, 12), 'aes-256-gcm') + } client.sendCounter = client.sendCounter || 0n // A packet is encrypted via AES256(plaintext + SHA256(send_counter + plaintext + secret_key)[0:8]). @@ -77,18 +79,21 @@ function createEncryptor (client, iv) { } function createDecryptor (client, iv) { - client.decipher = createDecipher(client.secretKeyBytes, iv) + if (client.versionLessThan('1.16.220')) { + client.decipher = createDecipher(client.secretKeyBytes, iv, 'aes-256-cfb8') + } else { + client.decipher = createDecipher(client.secretKeyBytes, iv.slice(0, 12), 'aes-256-gcm') + } + client.receiveCounter = client.receiveCounter || 0n function verify (chunk) { - // console.log('Decryptor: checking checksum', client.receiveCounter, chunk) const packet = chunk.slice(0, chunk.length - 8) const checksum = chunk.slice(chunk.length - 8, chunk.length) const computedCheckSum = computeCheckSum(packet, client.receiveCounter, client.secretKeyBytes) client.receiveCounter++ if (Buffer.compare(checksum, computedCheckSum) !== 0) { - // console.log('Inflated', inflatedLen, chunk.length, extraneousLen, chunk.toString('hex')) throw Error(`Checksum mismatch ${checksum.toString('hex')} != ${computedCheckSum.toString('hex')}`) } @@ -108,17 +113,3 @@ function createDecryptor (client, iv) { module.exports = { createCipher, createDecipher, createEncryptor, createDecryptor } - -// function testDecrypt () { -// const client = { -// secretKeyBytes: Buffer.from('ZOBpyzki/M8UZv5tiBih048eYOBVPkQE3r5Fl0gmUP4=', 'base64'), -// onDecryptedPacket: (...data) => console.log('Decrypted', data) -// } -// const iv = Buffer.from('ZOBpyzki/M8UZv5tiBih0w==', 'base64') - -// const decrypt = createDecryptor(client, iv) -// console.log('Dec', decrypt(Buffer.from('4B4FCA0C2A4114155D67F8092154AAA5EF', 'hex'))) -// console.log('Dec 2', decrypt(Buffer.from('DF53B9764DB48252FA1AE3AEE4', 'hex'))) -// } - -// testDecrypt() diff --git a/test/internal.js b/test/internal.js index 40aeb5e..09b184b 100644 --- a/test/internal.js +++ b/test/internal.js @@ -1,17 +1,15 @@ // process.env.DEBUG = 'minecraft-protocol raknet' const { Server, Client } = require('../') -const { dumpPackets, hasDumps } = require('../tools/genPacketDumps') +const { dumpPackets } = require('../tools/genPacketDumps') const DataProvider = require('../data/provider') // First we need to dump some packets that a vanilla server would send a vanilla // client. Then we can replay those back in our custom server. function prepare (version) { - if (!hasDumps(version)) { - return dumpPackets(version) - } + return dumpPackets(version) } -async function startTest (version = '1.16.210', ok) { +async function startTest (version = '1.16.201', ok) { await prepare(version) const Item = require('../types/Item')(version) const port = 19130 @@ -36,7 +34,7 @@ async function startTest (version = '1.16.210', ok) { // server logic server.on('connect', client => { client.on('join', () => { - console.log('Client joined', client.getData()) + console.log('Client joined server', client.getData()) client.write('resource_packs_info', { must_accept: false, diff --git a/test/internal.test.js b/test/internal.test.js index e3feeac..3f37b17 100644 --- a/test/internal.test.js +++ b/test/internal.test.js @@ -1,11 +1,15 @@ /* eslint-env jest */ const { timedTest } = require('./internal') +const { Versions } = require('../src/options') describe('internal client/server test', function () { this.timeout(120 * 1000) it('connects', async () => { - await timedTest() + for (const version in Versions) { + console.debug(version) + await timedTest(version) + } }) }) diff --git a/test/vanilla.js b/test/vanilla.js index 4f37d6b..3d7c11a 100644 --- a/test/vanilla.js +++ b/test/vanilla.js @@ -3,10 +3,11 @@ const vanillaServer = require('../tools/startVanillaServer') const { Client } = require('../src/client') const { waitFor } = require('../src/datatypes/util') const { ChunkColumn, Version } = require('bedrock-provider') +const { CURRENT_VERSION } = require('../src/options') async function test (version) { // Start the server, wait for it to accept clients, throws on timeout - const handle = await vanillaServer.startServerAndWait(version, 1000 * 120) + const handle = await vanillaServer.startServerAndWait(version, 1000 * 220) console.log('Started server') const client = new Client({ @@ -65,5 +66,5 @@ async function test (version) { clearInterval(loop) } -if (!module.parent) test() +if (!module.parent) test(CURRENT_VERSION) module.exports = { clientTest: test } diff --git a/tools/compileProtocol.js b/tools/compileProtocol.js index fabb0db..4163094 100644 --- a/tools/compileProtocol.js +++ b/tools/compileProtocol.js @@ -66,6 +66,7 @@ function createProtocol () { function copyLatest () { process.chdir(join(__dirname, '/../data/latest')) const version = genProtoSchema() + try { fs.mkdirSync(`../${version}`) } catch {} fs.writeFileSync(`../${version}/protocol.json`, JSON.stringify({ types: getJSON('./proto.json') }, null, 2)) fs.unlinkSync('./proto.json') // remove temp file fs.unlinkSync('./packet_map.yml') // remove temp file diff --git a/tools/genPacketDumps.js b/tools/genPacketDumps.js index 5add677..d91dc54 100644 --- a/tools/genPacketDumps.js +++ b/tools/genPacketDumps.js @@ -27,6 +27,7 @@ async function dump (version, force) { const client = new Client({ hostname: '127.0.0.1', port, + version, username: 'Boat' + random, offline: true }) diff --git a/tools/startVanillaServer.js b/tools/startVanillaServer.js index a409fca..169f3f7 100644 --- a/tools/startVanillaServer.js +++ b/tools/startVanillaServer.js @@ -48,7 +48,7 @@ async function download (os, version, path = 'bds-') { get(found, 'bds.zip') console.info('⚡ Unzipping') // Unzip server - if (process.platform === 'linux') cp.execSync('unzip bds.zip') + if (process.platform === 'linux') cp.execSync('unzip bds.zip && chmod +777 ./bedrock_server') else cp.execSync('tar -xf bds.zip') return verStr } @@ -83,7 +83,11 @@ async function startServer (version, onStart, options = {}) { configure(options) const handle = run(!onStart) if (onStart) { - handle.stdout.on('data', data => data.includes('Server started.') ? onStart() : null) + let stdout = '' + handle.stdout.on('data', data => { + stdout += data + if (stdout.includes('Server started')) onStart() + }) handle.stdout.pipe(process.stdout) handle.stderr.pipe(process.stdout) } diff --git a/types/Item.js b/types/Item.js index eb4d804..1153308 100644 --- a/types/Item.js +++ b/types/Item.js @@ -11,26 +11,52 @@ module.exports = (version) => } static fromBedrock (obj) { - return new Item({ - runtimeId: obj.runtime_id, - networkId: obj.item?.network_id, - count: obj.item?.auxiliary_value & 0xff, - metadata: obj.item?.auxiliary_value >> 8, - nbt: obj.item?.nbt?.nbt - }) + if (version === '1.16.220') { + return new Item({ + networkId: obj.network_id, + stackId: obj.stack_id, + blockRuntimeId: obj.block_runtime_id, + count: obj.count, + metadata: obj.metadata, + nbt: obj.extra.nbt + }) + } else { + return new Item({ + networkId: obj.runtime_id, + sackId: obj.item?.network_id, + count: obj.item?.auxiliary_value & 0xff, + metadata: obj.item?.auxiliary_value >> 8, + nbt: obj.item?.nbt?.nbt + }) + } } toBedrock () { - return { - runtime_id: this.runtimeId, - item: { + if (version === '1.16.220') { + return { network_id: this.networkId, - auxiliary_value: (this.metadata << 8) | (this.count & 0xff), - has_nbt: !!this.nbt, - nbt: { version: 1, nbt: this.nbt }, - can_place_on: [], - can_destroy: [], - blocking_tick: 0 + count: this.count, + metadata: this.metadata, + extra: { + has_nbt: !!this.nbt, + nbt: { version: 1, nbt: this.nbt }, + can_place_on: [], + can_destroy: [], + blocking_tick: 0 + } + } + } else { + return { + runtime_id: this.runtimeId, + item: { + network_id: this.networkId, + auxiliary_value: (this.metadata << 8) | (this.count & 0xff), + has_nbt: !!this.nbt, + nbt: { version: 1, nbt: this.nbt }, + can_place_on: [], + can_destroy: [], + blocking_tick: 0 + } } } }