minet-protocol-converter
Version:
1,656 lines (1,655 loc) • 52.9 kB
JSON
{
"types": {
"string": [
"pstring",
{
"countType": "i16"
}
],
"lstring": [
"pstring",
{
"countType": "li16"
}
],
"vector3": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
}
]
],
"vector2": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
}
]
],
"playerlocation": [
"array",
{
"countType": "i16",
"type": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "pitch",
"type": "f32"
},
{
"name": "headYaw",
"type": "f32"
}
]
]
}
],
"encapsulated_packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0xfe": "mcpe"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"mcpe": "mcpe_packet"
}
}
]
}
]
],
"mcpe_packet": [
"container",
[
{
"name": "name",
"type": [
"mapper",
{
"type": "u8",
"mappings": {
"0x01": "game_login",
"0x02": "player_status",
"0x03": "server_to_client_handshake",
"0x04": "client_to_server_handshake",
"0x05": "disconnect",
"0x06": "batch",
"0x07": "resource_packs_info",
"0x08": "resource_pack_stack",
"0x09": "resource_pack_client_response",
"0x0a": "text",
"0x0b": "set_time",
"0x0c": "start_game",
"0x0d": "add_player",
"0x0e": "add_entity",
"0x0f": "remove_entity",
"0x10": "add_item_entity",
"0x11": "add_hanging_entity",
"0x12": "take_item_entity",
"0x13": "move_entity",
"0x14": "move_player",
"0x15": "rider_jump",
"0x16": "remove_block",
"0x17": "update_block",
"0x18": "add_painting",
"0x19": "explode",
"0x1a": "level_sound_event",
"0x1b": "level_event",
"0x1c": "block_event",
"0x1d": "entity_event",
"0x1e": "mob_effect",
"0x1f": "update_attributes",
"0x20": "mob_equipment",
"0x21": "mob_armor_equipment",
"0x22": "interact",
"0x23": "use_item",
"0x24": "player_action",
"0x25": "player_fall",
"0x26": "hurt_armor",
"0x27": "set_entity_data",
"0x28": "set_entity_motion",
"0x29": "set_entity_link",
"0x2a": "set_health",
"0x2b": "set_spawn_position",
"0x2c": "animate",
"0x2d": "respawn",
"0x2e": "drop_item",
"0x2f": "inventory_action",
"0x30": "container_open",
"0x31": "container_close",
"0x32": "container_set_slot",
"0x33": "container_set_data",
"0x34": "container_set_content",
"0x35": "crafting_data",
"0x36": "crafting_event",
"0x37": "adventure_settings",
"0x38": "block_entity_data",
"0x39": "player_input",
"0x3a": "full_chunk_data",
"0x3b": "set_commands_enabled",
"0x3c": "set_difficulty",
"0x3d": "change_dimension",
"0x3e": "set_player_game_type",
"0x3f": "player_list",
"0x40": "event",
"0x41": "spawn_experience_orb",
"0x42": "clientbound_map_item_data_",
"0x43": "map_info_request",
"0x44": "request_chunk_radius",
"0x45": "chunk_radius_update",
"0x46": "item_fram_drop_item",
"0x47": "replace_selected_item",
"0x48": "game_rules_changed",
"0x49": "camera",
"0x4a": "add_item",
"0x4b": "boss_event",
"0x4d": "available_commands",
"0x4e": "command_step",
"0x4f": "resource_pack_data_info",
"0x50": "resource_pack_chunk_data",
"0x51": "resource_pack_chunk_request"
}
}
]
},
{
"name": "params",
"type": [
"switch",
{
"compareTo": "name",
"fields": {
"game_login": "packet_game_login",
"player_status": "packet_player_status",
"server_to_client_handshake": "packet_server_to_client_handshake",
"client_to_server_handshake": "packet_client_to_server_handshake",
"disconnect": "packet_disconnect",
"batch": "packet_batch",
"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",
"add_hanging_entity": "packet_add_hanging_entity",
"take_item_entity": "packet_take_item_entity",
"move_entity": "packet_move_entity",
"move_player": "packet_move_player",
"rider_jump": "packet_rider_jump",
"remove_block": "packet_remove_block",
"update_block": "packet_update_block",
"add_painting": "packet_add_painting",
"explode": "packet_explode",
"level_sound_event": "packet_level_sound_event",
"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",
"mob_equipment": "packet_mob_equipment",
"mob_armor_equipment": "packet_mob_armor_equipment",
"interact": "packet_interact",
"use_item": "packet_use_item",
"player_action": "packet_player_action",
"player_fall": "packet_player_fall",
"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",
"drop_item": "packet_drop_item",
"inventory_action": "packet_inventory_action",
"container_open": "packet_container_open",
"container_close": "packet_container_close",
"container_set_slot": "packet_container_set_slot",
"container_set_data": "packet_container_set_data",
"container_set_content": "packet_container_set_content",
"crafting_data": "packet_crafting_data",
"crafting_event": "packet_crafting_event",
"adventure_settings": "packet_adventure_settings",
"block_entity_data": "packet_block_entity_data",
"player_input": "packet_player_input",
"full_chunk_data": "packet_full_chunk_data",
"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",
"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_fram_drop_item": "packet_item_fram_drop_item",
"replace_selected_item": "packet_replace_selected_item",
"game_rules_changed": "packet_game_rules_changed",
"camera": "packet_camera",
"add_item": "packet_add_item",
"boss_event": "packet_boss_event",
"available_commands": "packet_available_commands",
"command_step": "packet_command_step",
"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"
}
}
]
}
]
],
"packet_game_login": [
"container",
[
{
"name": "protocol",
"type": "i32"
},
{
"name": "edition",
"type": "i8"
},
{
"name": "body",
"type": [
"buffer",
{
"countType": "varint"
}
]
}
]
],
"packet_player_status": [
"container",
[
{
"name": "status",
"type": "i32"
}
]
],
"packet_server_to_client_handshake": [
"container",
[
{
"name": "server_public_key",
"type": "string"
},
{
"name": "token_length",
"type": "length"
},
{
"name": "token",
"type": [
"buffer",
{
"countType": "varint",
"type": "i8"
}
]
}
]
],
"packet_client_to_server_handshake": [
"container",
[]
],
"packet_disconnect": [
"container",
[
{
"name": "hide_disconnect_reason",
"type": "bool"
},
{
"name": "message",
"type": "string"
}
]
],
"packet_batch": [
"container",
[
{
"name": "payload",
"type": [
"buffer",
{
"countType": "varint",
"type": "i8"
}
]
}
]
],
"packet_resource_packs_info": [
"container",
[
{
"name": "must_accept",
"type": "bool"
},
{
"name": "behahaviorpackinfos",
"type": "varint"
},
{
"name": "resourcepackinfos",
"type": "varint"
}
]
],
"packet_resource_pack_stack": [
"container",
[
{
"name": "must_accept",
"type": "bool"
},
{
"name": "behaviorpackidversions",
"type": "varint"
},
{
"name": "resourcepackidversions",
"type": "varint"
}
]
],
"packet_resource_pack_client_response": [
"container",
[
{
"name": "response_status",
"type": "u8"
},
{
"name": "resourcepackidversions",
"type": "varint"
}
]
],
"packet_text": [
"container",
[
{
"name": "type",
"type": "i8"
},
{
"name": "source",
"type": [
"switch",
{
"compareTo": "type",
"fields": {
"1": "string",
"3": "string"
},
"default": "void"
}
]
},
{
"name": "message",
"type": [
"switch",
{
"compareTo": "type",
"fields": {
"0": "string",
"1": "string",
"2": "string",
"3": "string",
"4": "string",
"5": "string"
},
"default": "void"
}
]
}
]
],
"packet_set_time": [
"container",
[
{
"name": "time",
"type": "varint"
},
{
"name": "started",
"type": "bool"
}
]
],
"packet_start_game": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "spawn",
"type": "vector3"
},
{
"name": "unknown_1",
"type": "vector2"
},
{
"name": "seed",
"type": "varint"
},
{
"name": "dimension",
"type": "varint"
},
{
"name": "generator",
"type": "varint"
},
{
"name": "gamemode",
"type": "varint"
},
{
"name": "difficulty",
"type": "varint"
},
{
"name": "x",
"type": "varint"
},
{
"name": "y",
"type": "varint"
},
{
"name": "z",
"type": "varint"
},
{
"name": "has_achievements_disabled",
"type": "bool"
},
{
"name": "day_cycle_stop_time",
"type": "varint"
},
{
"name": "edu_mode",
"type": "bool"
},
{
"name": "rain_level",
"type": "f32"
},
{
"name": "lightnig_level",
"type": "f32"
},
{
"name": "enable_commands",
"type": "bool"
},
{
"name": "is_texturepacks_required",
"type": "bool"
},
{
"name": "secret",
"type": "string"
},
{
"name": "world_name",
"type": "string"
}
]
],
"packet_add_player": [
"container",
[
{
"name": "uuid",
"type": "uuid"
},
{
"name": "username",
"type": "string"
},
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "speed_x",
"type": "f32"
},
{
"name": "speed_y",
"type": "f32"
},
{
"name": "speed_z",
"type": "f32"
},
{
"name": "pitch",
"type": "f32"
},
{
"name": "head_yaw",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "item",
"type": "varint"
},
{
"name": "metadata",
"type": "varint"
}
]
],
"packet_add_entity": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "entity_type",
"type": "varint"
},
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "speed_x",
"type": "f32"
},
{
"name": "speed_y",
"type": "f32"
},
{
"name": "speed_z",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "pitch",
"type": "f32"
},
{
"name": "attributes",
"type": "varint"
},
{
"name": "metadata",
"type": "varint"
},
{
"name": "links",
"type": "links"
}
]
],
"packet_remove_entity": [
"container",
[
{
"name": "entity_id",
"type": "varint"
}
]
],
"packet_add_item_entity": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "item",
"type": "varint"
},
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "speed_x",
"type": "f32"
},
{
"name": "speed_y",
"type": "f32"
},
{
"name": "speed_z",
"type": "f32"
}
]
],
"packet_add_hanging_entity": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "coordinates",
"type": "varint"
},
{
"name": "unknown",
"type": "varint"
}
]
],
"packet_take_item_entity": [
"container",
[
{
"name": "target",
"type": "varint"
},
{
"name": "entity_id",
"type": "varint"
}
]
],
"packet_move_entity": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "position",
"type": "playerlocation"
}
]
],
"packet_move_player": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "pitch",
"type": "f32"
},
{
"name": "head_yaw",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "mode",
"type": "u8"
},
{
"name": "on_ground",
"type": "bool"
}
]
],
"packet_rider_jump": [
"container",
[]
],
"packet_remove_block": [
"container",
[
{
"name": "coordinates",
"type": "varint"
}
]
],
"packet_update_block": [
"container",
[
{
"name": "coordinates",
"type": "varint"
},
{
"name": "block_id",
"type": "varint"
},
{
"name": "block_meta_and_priority",
"type": "varint"
}
]
],
"packet_add_painting": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "runtime_entity_id",
"type": "varint"
},
{
"name": "coordinates",
"type": "varint"
},
{
"name": "direction",
"type": "varint"
},
{
"name": "title",
"type": "string"
}
]
],
"packet_explode": [
"container",
[
{
"name": "position",
"type": "vector3"
},
{
"name": "radius",
"type": "f32"
},
{
"name": "records",
"type": "varint"
}
]
],
"packet_level_sound_event": [
"container",
[
{
"name": "sound_id",
"type": "u8"
},
{
"name": "position",
"type": "vector3"
},
{
"name": "volume",
"type": "varint"
},
{
"name": "pitch",
"type": "varint"
},
{
"name": "unknown1",
"type": "bool"
},
{
"name": "unknown2",
"type": "bool"
}
]
],
"packet_level_event": [
"container",
[
{
"name": "event_id",
"type": "varint"
},
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
},
{
"name": "data",
"type": "varint"
}
]
],
"packet_block_event": [
"container",
[
{
"name": "coordinates",
"type": "varint"
},
{
"name": "case_1",
"type": "varint"
},
{
"name": "case_2",
"type": "varint"
}
]
],
"packet_entity_event": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "event_id",
"type": "u8"
},
{
"name": "unknown",
"type": "varint"
}
]
],
"packet_mob_effect": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "event_id",
"type": "u8"
},
{
"name": "effect_id",
"type": "varint"
},
{
"name": "amplifier",
"type": "varint"
},
{
"name": "particles",
"type": "bool"
},
{
"name": "duration",
"type": "varint"
}
]
],
"packet_update_attributes": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "attributes",
"type": "varint"
}
]
],
"packet_mob_equipment": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "item",
"type": "varint"
},
{
"name": "slot",
"type": "u8"
},
{
"name": "selected_slot",
"type": "u8"
},
{
"name": "unknown",
"type": "u8"
}
]
],
"packet_mob_armor_equipment": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "helmet",
"type": "varint"
},
{
"name": "chestplate",
"type": "varint"
},
{
"name": "leggings",
"type": "varint"
},
{
"name": "boots",
"type": "varint"
}
]
],
"packet_interact": [
"container",
[
{
"name": "action_id",
"type": "u8"
},
{
"name": "target_entity_id",
"type": "varint"
}
]
],
"packet_use_item": [
"container",
[
{
"name": "blockcoordinates",
"type": "varint"
},
{
"name": "unknown",
"type": "varint"
},
{
"name": "face",
"type": "varint"
},
{
"name": "facecoordinates",
"type": "vector3"
},
{
"name": "playerposition",
"type": "vector3"
},
{
"name": "slot",
"type": "varint"
},
{
"name": "item",
"type": "varint"
}
]
],
"packet_player_action": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "action_id",
"type": "varint"
},
{
"name": "coordinates",
"type": "varint"
},
{
"name": "face",
"type": "varint"
}
]
],
"packet_player_fall": [
"container",
[]
],
"packet_hurt_armor": [
"container",
[
{
"name": "health",
"type": "varint"
}
]
],
"packet_set_entity_data": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "metadata",
"type": "varint"
}
]
],
"packet_set_entity_motion": [
"container",
[
{
"name": "entity_id",
"type": "varint"
},
{
"name": "velocity",
"type": "vector3"
}
]
],
"packet_set_entity_link": [
"container",
[
{
"name": "rider_id",
"type": "varint"
},
{
"name": "ridden_id",
"type": "varint"
},
{
"name": "link_type",
"type": "u8"
}
]
],
"packet_set_health": [
"container",
[
{
"name": "health",
"type": "varint"
}
]
],
"packet_set_spawn_position": [
"container",
[
{
"name": "unknown_1",
"type": "varint"
},
{
"name": "coordinates",
"type": "varint"
}
]
],
"packet_animate": [
"container",
[
{
"name": "action_id",
"type": "varint"
},
{
"name": "entity_id",
"type": "varint"
}
]
],
"packet_respawn": [
"container",
[
{
"name": "x",
"type": "f32"
},
{
"name": "y",
"type": "f32"
},
{
"name": "z",
"type": "f32"
}
]
],
"packet_drop_item": [
"container",
[
{
"name": "itemtype",
"type": "u8"
},
{
"name": "item",
"type": "varint"
}
]
],
"packet_inventory_action": [
"container",
[
{
"name": "unknown",
"type": "varint"
},
{
"name": "item",
"type": "varint"
}
]
],
"packet_container_open": [
"container",
[
{
"name": "window_id",
"type": "u8"
},
{
"name": "type",
"type": "u8"
},
{
"name": "slot_count",
"type": "varint"
},
{
"name": "coordinates",
"type": "varint"
},
{
"name": "unown_entity_id",
"type": "varint"
}
]
],
"packet_container_close": [
"container",
[
{
"name": "window_id",
"type": "u8"
}
]
],
"packet_container_set_slot": [
"container",
[
{
"name": "window_id",
"type": "u8"
},
{
"name": "slot",
"type": "varint"
},
{
"name": "hotbarslot",
"type": "varint"
},
{
"name": "item",
"type": "varint"
},
{
"name": "unknown2",
"type": "u8"
}
]
],
"packet_container_set_data": [
"container",
[
{
"name": "window_id",
"type": "u8"
},
{
"name": "property",
"type": "varint"
},
{
"name": "value",
"type": "varint"
}
]
],
"packet_container_set_content": [
"container",
[
{
"name": "window_id",
"type": "u8"
},
{
"name": "slot_data",
"type": "varint"
},
{
"name": "hotbar_data",
"type": "varint"
}
]
],
"packet_crafting_data": [
"container",
[
{
"name": "recipes",
"type": "varint"
}
]
],
"packet_crafting_event": [
"container",
[
{
"name": "window_id",
"type": "u8"
},
{
"name": "recipe_type",
"type": "varint"
},
{
"name": "recipe_id",
"type": "uuid"
},
{
"name": "input",
"type": "varint"
},
{
"name": "result",
"type": "varint"
}
]
],
"packet_adventure_settings": [
"container",
[
{
"name": "flags",
"type": "varint"
},
{
"name": "user_permission",
"type": "varint"
}
]
],
"packet_block_entity_data": [
"container",
[
{
"name": "coordinates",
"type": "varint"
},
{
"name": "namedtag",
"type": "varint"
}
]
],
"packet_player_input": [
"container",
[
{
"name": "motion_x",
"type": "f32"
},
{
"name": "motion_z",
"type": "f32"
},
{
"name": "flag1",
"type": "bool"
},
{
"name": "flag2",
"type": "bool"
}
]
],
"packet_full_chunk_data": [
"container",
[
{
"name": "chunk_x",
"type": "varint"
},
{
"name": "chunk_z",
"type": "varint"
},
{
"name": "chunk_data",
"type": [
"buffer",
{
"countType": "varint",
"type": "i8"
}
]
}
]
],
"packet_set_commands_enabled": [
"container",
[
{
"name": "enabled",
"type": "bool"
}
]
],
"packet_set_difficulty": [
"container",
[
{
"name": "difficulty",
"type": "varint"
}
]
],
"packet_change_dimension": [
"container",
[
{
"name": "dimension",
"type": "varint"
},
{
"name": "position",
"type": "vector3"
},
{
"name": "unknown",
"type": "bool"
}
]
],
"packet_set_player_game_type": [
"container",
[
{
"name": "unknown",
"type": "varint"
}
]
],
"packet_player_list": [
"container",
[
{
"name": "records",
"type": "varint"
}
]
],
"packet_event": [
"container",
[]
],
"packet_spawn_experience_orb": [
"container",
[
{
"name": "position",
"type": "vector3"
},
{
"name": "count",
"type": "varint"
}
]
],
"packet_clientbound_map_item_data_": [
"container",
[
{
"name": "mapinfo",
"type": "varint"
}
]
],
"packet_map_info_request": [
"container",
[
{
"name": "map_id",
"type": "varint"
}
]
],
"packet_request_chunk_radius": [
"container",
[
{
"name": "chunk_radius",
"type": "varint"
}
]
],
"packet_chunk_radius_update": [
"container",
[
{
"name": "chunk_radius",
"type": "varint"
}
]
],
"packet_item_fram_drop_item": [
"container",
[
{
"name": "coordinates",
"type": "varint"
},
{
"name": "item",
"type": "varint"
}
]
],
"packet_replace_selected_item": [
"container",
[]
],
"packet_game_rules_changed": [
"container",
[
{
"name": "rules",
"type": "varint"
}
]
],
"packet_camera": [
"container",
[]
],
"packet_add_item": [
"container",
[]
],
"packet_boss_event": [
"container",
[]
],
"packet_available_commands": [
"container",
[
{
"name": "commands",
"type": "string"
},
{
"name": "unknown",
"type": "string"
}
]
],
"packet_command_step": [
"container",
[
{
"name": "command_name",
"type": "string"
},
{
"name": "command_overload",
"type": "string"
},
{
"name": "unknown_1",