diff --git a/CMakeLists.txt b/CMakeLists.txt index aa9eeba..04ec0b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,9 +97,6 @@ macro(invoke_py message) endif () endmacro(invoke_py) -invoke_py("Generate Java String Data" - "${PROJECT_SOURCE_DIR}/codegen_script/string_gen.py" "${PROJECT_SOURCE_DIR}/strings/strings_je.json" - "${GEN_RESOURCE_DIR}/strings_je.c" "${GEN_RESOURCE_DIR}/strings_je.h" "je") invoke_py("Generate Entity ID Data" "${PROJECT_SOURCE_DIR}/codegen_script/entity_id_gen.py" "${PROJECT_SOURCE_DIR}/minecraft-data/java" "${CMAKE_CURRENT_BINARY_DIR}/preprocess_resources") diff --git a/codegen_script/string_gen.py b/codegen_script/string_gen.py deleted file mode 100644 index d634dfa..0000000 --- a/codegen_script/string_gen.py +++ /dev/null @@ -1,60 +0,0 @@ -import json -import sys - -data_source_file = sys.argv[1] -code_gen_file = sys.argv[2] -code_gen_header = sys.argv[3] -edition = sys.argv[4] - -packet_client_lines = [] -packet_server_lines = [] - -def read_data(): - with open(data_source_file, 'r', encoding='utf-8') as f: - data = json.load(f) - packet_name_json = data['packet_names'] - for key, value in packet_name_json['toClient'].items(): - packet_client_lines.append(f'\tDEFINE_NAME_CLIENT({key}, {value})') - for key, value in packet_name_json['toServer'].items(): - packet_server_lines.append(f'\tDEFINE_NAME_SERVER({key}, {value})') - - -def write_data(): - with open(code_gen_header, 'w', encoding='utf-8') as f: - f.write('\n'.join([ - '// Auto generate codes, DO NOT MODIFY THIS FILE', - '#pragma once', - '#include "mc_dissector.h"', - '#include ', - f'void register_string_{edition}();', - f'extern wmem_map_t *protocol_name_map_client_{edition};', - f'extern wmem_map_t *protocol_name_map_server_{edition};', - '' - ])) - with open(code_gen_file, 'w', encoding='utf-8') as f: - f.write('\n'.join([ - '// Auto generate codes, DO NOT MODIFY THIS FILE', - f'#include "strings_{edition}.h"', - f'wmem_map_t *protocol_name_map_client_{edition} = NULL;', - f'wmem_map_t *protocol_name_map_server_{edition} = NULL;', - f'#define DEFINE_NAME_CLIENT(name, desc) wmem_map_insert(protocol_name_map_client_{edition}, #name, #desc);', - f'#define DEFINE_NAME_SERVER(name, desc) wmem_map_insert(protocol_name_map_server_{edition}, #name, #desc);', - '' - ])) - # main - f.write('\n'.join([ - f'void register_string_{edition}() {{', - f'\tprotocol_name_map_client_{edition} = wmem_map_new(wmem_epan_scope(), g_str_hash, g_str_equal);', - f'\tprotocol_name_map_server_{edition} = wmem_map_new(wmem_epan_scope(), g_str_hash, g_str_equal);', - ])) - # add packet names - f.write('\n'.join(packet_client_lines)) - f.write('\n') - f.write('\n'.join(packet_server_lines)) - f.write('\n}\n\n') - - -read_data() -write_data() -print(f'Generate {len(packet_client_lines)} packet client lines.') -print(f'Generate {len(packet_server_lines)} packet server lines.') diff --git a/protocol/protocol_data.c b/protocol/protocol_data.c index 63c2450..61e98aa 100644 --- a/protocol/protocol_data.c +++ b/protocol/protocol_data.c @@ -30,7 +30,6 @@ gint read_var_int_with_limit(tvbuff_t *tvb, gint offset, gint max_length, gint * *result |= (read & 0x7F) << (7 * p++); } while ((read & 0x80) != 0); return p; - } gint read_var_long(tvbuff_t *tvb, gint offset, gint64 *result) { diff --git a/protocol/storage/storage.c b/protocol/storage/storage.c index ffcf024..d9943a9 100644 --- a/protocol/storage/storage.c +++ b/protocol/storage/storage.c @@ -6,10 +6,8 @@ extern gchar *pref_protocol_data_dir; -cJSON *cached_versions = NULL; -cJSON *cached_protocol_data_mapping = NULL; - #define JSON_CACHED(name, path) \ +cJSON* cached_##name = NULL; \ void ensure_cached_##name() { \ if (cached_##name == NULL) { \ gchar *file = g_build_filename(pref_protocol_data_dir, path, NULL); \ @@ -25,12 +23,12 @@ void ensure_cached_##name() { \ } #define DATA_CACHED_UINT(name) \ -wmem_map_t *cached_##name; \ +wmem_map_t *cached_##name = NULL; \ void *get_cached_##name(guint version) { \ if (cached_##name == NULL) \ return NULL; \ return wmem_map_lookup(cached_##name, GUINT_TO_POINTER(version)); \ -} \ +} \ void set_cached_##name(guint version, void *value) { \ if (cached_##name == NULL) \ cached_##name = wmem_map_new(wmem_epan_scope(), g_direct_hash, g_direct_equal); \ @@ -43,7 +41,7 @@ void *get_cached_##name(gchar *java_version) { \ if (cached_##name == NULL) \ return NULL; \ return wmem_map_lookup(cached_##name, java_version); \ -} \ +} \ void set_cached_##name(gchar *java_version, void *value) { \ if (cached_##name == NULL) \ cached_##name = wmem_map_new(wmem_epan_scope(), g_str_hash, g_str_equal); \ @@ -66,11 +64,14 @@ JSON_CACHED(versions, "java_edition/versions.json") JSON_CACHED(protocol_data_mapping, "java_edition/protocol_mapping.json") +JSON_CACHED(packet_names, "java_edition/packet_names.json") + DATA_CACHED_UINT(protocol) void clear_storage() { CLEAR_CACHED_JSON(versions) CLEAR_CACHED_JSON(protocol_data_mapping) + CLEAR_CACHED_JSON(packet_names) CLEAR_CACHED_DATA(protocol) } @@ -105,6 +106,17 @@ gint get_data_version(gchar *java_version) { return -1; } +gchar *get_readable_packet_name(bool to_client, gchar *packet_name) { + ensure_cached_packet_names(); + cJSON *found = cJSON_GetObjectItem( + cJSON_GetObjectItem(cached_packet_names, to_client ? "toClient" : "toServer"), + packet_name + ); + if (found == NULL) + return packet_name; + return found->valuestring; +} + protocol_je_set get_protocol_set_je(guint protocol_version, protocol_settings settings) { ensure_cached_protocol_data_mapping(); protocol_je_set cached = get_cached_protocol(protocol_version); @@ -117,7 +129,8 @@ protocol_je_set get_protocol_set_je(guint protocol_version, protocol_settings se if (found == NULL) return NULL; - gchar *file = g_build_filename(pref_protocol_data_dir, "java_edition/protocols", found->valuestring, "protocol.json", NULL); + gchar *file = g_build_filename(pref_protocol_data_dir, "java_edition/protocols", found->valuestring, + "protocol.json", NULL); gchar *content = NULL; if (!g_file_get_contents(file, &content, NULL, NULL)) { ws_log("MC-Dissector", LOG_LEVEL_WARNING, "Cannot read file %s", file); diff --git a/protocol/storage/storage.h b/protocol/storage/storage.h index 36f1c9e..e13ad21 100644 --- a/protocol/storage/storage.h +++ b/protocol/storage/storage.h @@ -5,7 +5,6 @@ #ifndef MC_DISSECTOR_STORAGE_H #define MC_DISSECTOR_STORAGE_H -#include #include "protocol/schema/protocol_schema.h" typedef struct _protocol_je_set { @@ -20,6 +19,8 @@ gchar **get_mapped_java_versions(guint protocol_version); gint get_data_version(gchar *java_version); +gchar *get_readable_packet_name(bool to_client, gchar *packet_name); + protocol_je_set get_protocol_set_je(guint protocol_version, protocol_settings settings); #endif //MC_DISSECTOR_STORAGE_H diff --git a/protocol_je/je_protocol.c b/protocol_je/je_protocol.c index b290c0b..b4b7bcb 100644 --- a/protocol_je/je_protocol.c +++ b/protocol_je/je_protocol.c @@ -7,7 +7,6 @@ #include "mc_dissector.h" #include "je_dissect.h" #include "je_protocol.h" -#include "strings_je.h" extern int hf_invalid_data_je; extern int hf_ignored_packet_je; @@ -232,24 +231,20 @@ void handle(proto_tree *packet_tree, packet_info *pinfo, tvbuff_t *tvb, mcje_pro proto_tree_add_string(packet_tree, hf_invalid_data_je, tvb, 0, 1, "Can't find protocol set"); return; } + protocol_entry protocol = get_protocol_entry(protocol_set, packet_id, is_client); proto_tree_add_uint(packet_tree, hf_packet_id_je, tvb, 0, read, packet_id); if (protocol == NULL) { proto_tree_add_string(packet_tree, hf_unknown_packet_je, tvb, 0, 1, "Unknown Packet ID"); return; } + gchar *packet_name = get_packet_name(protocol); - gchar *better_name = wmem_map_lookup( - is_client ? protocol_name_map_client_je : protocol_name_map_server_je, - packet_name + gchar *better_name = get_readable_packet_name(is_client, packet_name); + proto_tree_add_string_format_value( + packet_tree, hf_packet_name_je, tvb, 0, read, packet_name, + "%s (%s)", better_name, packet_name ); - if (better_name == NULL) - proto_tree_add_string(packet_tree, hf_packet_name_je, tvb, 0, read, packet_name); - else - proto_tree_add_string_format_value( - packet_tree, hf_packet_name_je, tvb, 0, read, packet_name, - "%s (%s)", better_name, packet_name - ); bool ignore = false; if (strlen(pref_ignore_packets_je) != 0) { diff --git a/protocol_je/je_registers.c b/protocol_je/je_registers.c index 63129bf..babe0e0 100644 --- a/protocol_je/je_registers.c +++ b/protocol_je/je_registers.c @@ -4,7 +4,6 @@ #include #include "mc_dissector.h" -#include "strings_je.h" #include "je_protocol.h" // ett @@ -50,8 +49,6 @@ int hf_legacy_slp_payload = -1; void proto_register_mcje() { proto_mcje = proto_register_protocol(MCJE_NAME, MCJE_SHORT_NAME, MCJE_FILTER); - register_string_je(); - static hf_register_info hf_je[] = { DEFINE_HF(hf_int8_je, " [int8]", "mcje.int8", INT8, DEC) DEFINE_HF(hf_uint8_je, " [uint8]", "mcje.uint8", UINT8, DEC) diff --git a/strings/README-zh_CN.MD b/strings/README-zh_CN.MD deleted file mode 100644 index cae0a45..0000000 --- a/strings/README-zh_CN.MD +++ /dev/null @@ -1,182 +0,0 @@ -这个目录是程序内部使用的字符串定义文件目录,用于定义协议描述文件内的字段的显示名称、显示格式等。如果字符串缺失或错误,在最终显示时可能会发生异常。 - -## 添加字符串 - -JSON 文件按照以下格式定义: - -* `hf_defines`:定义基础字段。 -* `mappings`:定义字段与协议描述文件字段的映射。 -* `bitmask_collection`:定义位掩码。 -* `value_mappings`:定义数据与字符串的映射。 -* `component_names`:定义协议描述组件名称。 -* `packet_names`:定义协议描述包名称。 - -### 定义基础字段 - -如果一个协议描述文件之中的字段类型为基础类型(如`varint`,`string`等)或为`buffer`、`mapping`、`bitfield` -内的字段、`switch`中的以上列类型作为值的项或带有上列类型作为附加参数的`option` -,则这个字段要求写入`hf_defines`。`hf_defines`内元素的定义如下: - -* `name`:字段描述,用于展示这个字段的实际用途。 -* `type`:字段类型。字段类型名称和协议描述文件内的字段类型名称不完全一致,下方为对照表。 - -| 协议描述文件内字段类型 | 字段类型名称 | -|:-------------:|:--------:| -| `varint` | `u32` | -| `varlong` | `u64` | -| `optvarint` | `u32` | -| `buffer` | `bytes` | -| `UUID` | `uuid` | -| `restBuffer` | `bytes` | -| `nbt` | `bytes` | -| `optionalNbt` | `bytes` | -| `string` | `string` | -| 其他类型 | 名称相同 | - -* `display`:字段显示格式,可选,可以为`DEC`、`HEX`等。如果字段类型和显示格式无法对应则编译出的插件加载时会直接报错。 -* `bitamsk`:如果字段是在`bitfield`内定义的,它还必须附加位掩码的信息,以16进制数字写入,不带`0x`。 -* `value_mapping`:定义字段内值与显示值的映射,可以不存在。这些值要在`value_mappings`内定义,键为字段的值,值为映射后显示的值。 - -协议描述字段和定义字段需要使用`mappings`绑定,其值为定义字段的名称,键为**协议字段路径**。协议字段路径的定义如下: - -* 协议字段路径是按照后缀查找的,即`a/b/c`会先查找`a/b/c`,如果不存在则查找`b/c`,如果还不存在则查找`c`。 -* 路径的节点名称为每一层`container`或`bitfield`定义的名称,如果对应字段没有写`name`则为`[unnamed]`。 -* 如果字段的类型引用其他非基本类型,则需要在整个路径的最后再添加上一个`/`,其中``为非基本类型的名称。 -* 如果字段在`switch`内(父节点在`switch`内也算),则可以指定`switch`分支,只需要在整个路径后面加上`[]`,其中`case` - 为分支名称。 -* 对于`packet_`开头的根节点,其`packet_`需要被省略。 - -以`slot`举例: - -```json -{ - "slot": [ - "container", - [ - { - "name": "present", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "present", - "fields": { - "false": "void", - "true": [ - "container", - [ - { - "name": "itemId", - "type": "varint" - }, - { - "name": "itemCount", - "type": "i8" - }, - { - "name": "nbtData", - "type": "optionalNbt" - } - ] - ] - } - } - ] - } - ] - ] -} -``` - -`slot`内部共有4个基础字段和1个组件(`container`),分别为: - -* `slot/present` -* `slot/[unnamed]/itemId`(或`slot/[unnamed]/itemId[true]`) -* `slot/[unnamed]/itemCount`(或`slot/[unnamed]/itemCount[true]`) -* `slot/[unnamed]/nbtData`(或`slot/[unnamed]/nbtData[true]`) -* `slot/[unnamed]` - -再以`packet_set_slot`为例: - -```json -{ - "packet_set_slot": [ - "container", - [ - { - "name": "windowId", - "type": "i8" - }, - { - "name": "stateId", - "type": "varint" - }, - { - "name": "slot", - "type": "i16" - }, - { - "name": "item", - "type": "slot" - } - ] - ] -} -``` - -`packet_set_slot`内部共有3个基础字段和1个组件(`slot`),分别为: - -* `set_slot/windowId` -* `set_slot/stateId` -* `set_slot/slot` -* `set_slot/item/slot` - -### 定义位掩码字段 - -如果一个字段的类型是`bitfield`,则它需要在`bitmask_collection`内定义,名称的格式为`([])+`,其中`bitsize` -为位数,`name`为名称,必须按照顺序定义。例如22位的`x`、22位的`z`和20位的`y`定义为`[22]x[22]z[20]y` -。值为一个列表,按照顺序填写上文中定义的基础字段,如果位置上没有定义基础字段则置为`null`。 - -以`[6]unused[1]max_present[1]min_present`举例: - -```json -[ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] -] -``` - -对应的定义为: - -```json -{ - "[6]unused[1]max_present[1]min_present": [ - null, - "max_present_1", - "min_present_1" - ] -} -``` - -### 定义组件 - -如果一个字段的类型是`container`、`array`或其他非基础类型,它就属于组件,应该在`component_names`内定义。其键为协议字段路径,值为名称。 \ No newline at end of file diff --git a/strings/README.MD b/strings/README.MD deleted file mode 100644 index e0141a1..0000000 --- a/strings/README.MD +++ /dev/null @@ -1,184 +0,0 @@ -This directory is a string definition file directory for program internal use to define display name and display format of fields in protocol description file. If there are strings missing or containing errors, displaying exception can exist in final displaying. - -## To Add Strings - -JSON files should be defined basing on formats as follow: - -* `hf_defines`:To define basic fields. -* `mappings`:To define mapping between fields and protocol description file fields. -* `bitmask_collection`:To define bitmasks. -* `value_mappings`:To define mapping between data and strings. -* `component_names`:To define names of protocol define components. -* `packet_names`:To define names of protocol define packets. - -### To Define Basic Fields - -If fields in a protocol description file are: - -1. Basic ones(for example `varint`,`string`) -2. Fields in `buffer`、`mapping`、`bitfield` -3. Items with types mentioned upon as values in `switch` -4. `option` with types mentioned upon as additional parameters - -`hf_defines` should be wrote into the field. Definition of elements in `hf_defines` are as follow: - -* `name`:Field description, to display real usage of the field. -* `type`:Field type. Field type names are not full equivalences of field types in protocol description files. Comparison table is as follow: - -| Field type in protocol description files | Field type names | -|:-------------:|:--------:| -| `varint` | `u32` | -| `varlong` | `u64` | -| `optvarint` | `u32` | -| `buffer` | `bytes` | -| `UUID` | `uuid` | -| `restBuffer` | `bytes` | -| `nbt` | `bytes` | -| `optionalNbt` | `bytes` | -| `string` | `string` | -| Other types | Identical | - -* `display`:Format of field displaying, optional, can be `DEC`, `HEX` etc., If field types cannot correspond to its displaying format, crash will be reported when loading complied plugins. -* `bitmask`:If fields were defined in `bitfield`, it needs additional information of bitmasks written in hexademical numbers without `0x`. -* `value_mapping`:To define mappings between values and displaying values in the fields. These values should be defined in `value_mappings`. Keys are values of fields, values are values display after mapping. - -Protocol description fields and definition fields should be bound by using `mappings`, values are names of defined fields, keys are **paths of protocol fields**. Definitions of path of protocol fields are as follow: - -* Path of protocol fields is found by suffixes that `a/b/c` will find `a/b/c` first, and find `b/c` if `a/b/c` does not exist,and find `c` if `b/c` still not exist. -* Node name of the path is the name defined by `container` or `bitfield`, if no `name` exists in corresponding fields, it should be `[unnamed]`. -* If field types are quotations of other nonfundamental types, `/` should be added at the end of the whole path, in which `` represents names of nonfundamental types. -* If fields are in `switch` (including circumstances with father nodes in `switch`), `switch` branch can be specified only to add `[]` at the end of the whole path, in which `case` represents branch names. -* `packet_` should be omitted in root nodes begins from `packet_`. - -Take `slot` as an example: - -```json -{ - "slot": [ - "container", - [ - { - "name": "present", - "type": "bool" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "present", - "fields": { - "false": "void", - "true": [ - "container", - [ - { - "name": "itemId", - "type": "varint" - }, - { - "name": "itemCount", - "type": "i8" - }, - { - "name": "nbtData", - "type": "optionalNbt" - } - ] - ] - } - } - ] - } - ] - ] -} -``` - -4 basic fields and a module (`container`) is contained in `slot`, they are: - -* `slot/present` -* `slot/[unnamed]/itemId`(or `slot/[unnamed]/itemId[true]`) -* `slot/[unnamed]/itemCount`(or `slot/[unnamed]/itemCount[true]`) -* `slot/[unnamed]/nbtData`(or `slot/[unnamed]/nbtData[true]`) -* `slot/[unnamed]` - -Take `packet_set_slot` as another example - -```json -{ - "packet_set_slot": [ - "container", - [ - { - "name": "windowId", - "type": "i8" - }, - { - "name": "stateId", - "type": "varint" - }, - { - "name": "slot", - "type": "i16" - }, - { - "name": "item", - "type": "slot" - } - ] - ] -} -``` - -3 basic fields and a module (`slot`) is contained in `packet_set_slot`, they are: - -* `set_slot/windowId` -* `set_slot/stateId` -* `set_slot/slot` -* `set_slot/item/slot` - -### To Define Bitmask Fields - -If the type if a field is `bitfield`, it should be defined in `bitmask_collection` with name format `([])+`, in which `bitsize` represents digit, `name` represents name. The definition needs to be finished in sequence, for example, a 22-digit `x`, a 22-digit `z` and a 20-digit `y` should be defined as `[22]x[22]z[20]y`. Values are contained in a list with basic fields defined in above texts. `null` should exists at positions with no basic field defined. - -Take `[6]unused[1]max_present[1]min_present` as an example: - -```json -[ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] -] -``` - -Corresponding definition should be: - -```json -{ - "[6]unused[1]max_present[1]min_present": [ - null, - "max_present_1", - "min_present_1" - ] -} -``` - -### To Define Components - -If the type of a field is `container`, `array` or other nonfundamental types, it is a component and should be defined in `component_names`. Key is path of protocol fields, value is its name. \ No newline at end of file diff --git a/strings/strings_je.json b/strings/strings_je.json deleted file mode 100644 index 791c4ae..0000000 --- a/strings/strings_je.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "packet_names": { - "toClient": { - "disconnect": "Client Login Disconnect", - "encryption_begin": "Client Hello", - "success": "Client Login Success", - "compress": "Client Compression", - "login_plugin_request": "Client Custom Query", - "bundle_delimiter": "Client Bundle Delimter", - "spawn_entity": "Client Add Entity", - "spawn_entity_experience_orb": "Client Add Experience Orb", - "named_entity_spawn": "Client Add Player", - "animation": "Client Animation", - "statistics": "Client Award Statistics", - "acknowledge_player_digging": "Client Block Changed ACK", - "block_break_animation": "Client Block Destruction", - "tile_entity_data": "Client Block Entity Data", - "block_action": "Client Block Action", - "block_change": "Client Block Event", - "boss_bar": "Client Boss Event", - "difficulty": "Client Change Difficulty", - "chunk_biomes": "Client Chunks Biomes", - "clear_titles": "Client Clear Titles", - "tab_complete": "Client Command Suggestions", - "declare_commands": "Client Commands", - "close_window": "Client Container Close", - "window_items": "Client Container Set Content", - "craft_progress_bar": "Client Container Set Data", - "set_slot": "Client Container Set Slot", - "set_cooldown": "Client Cooldown", - "chat_suggestions": "Client Custom Chat Completions", - "custom_payload": "Client Custom Payload", - "damage_event": "Client Damage Event", - "hide_message": "Client Delete Chat", - "kick_disconnect": "Client Disconnect", - "profileless_chat": "Client Disguised Chat", - "entity_status": "Client Entity Event", - "explosion": "Client Explode", - "unload_chunk": "Client Forget Level Chunk", - "game_state_change": "Client Game Event", - "open_horse_window": "Client Horse ScreenOpen", - "hurt_animation": "Client Hurt Animation", - "initialize_world_border": "Client Initialize Border", - "keep_alive": "Client Keep Alive", - "map_chunk": "Client Level Chunk with Light", - "world_event": "Client Level Event", - "world_particles": "Client Level Particles", - "update_light": "Client Light Update", - "login": "Client Login", - "map": "Client Map Item Data", - "trade_list": "Client Merchant Offers", - "rel_entity_move": "Client Move Entity Position", - "entity_move_look": "Client Move Entity Position & Rotation", - "entity_look": "Client Move Entity Rotation", - "vehicle_move": "Client Move Vehicle", - "open_book": "Client Open Book", - "open_window": "Client Open Screen", - "open_sign_entity": "Client Open Sign Editor", - "ping": "Client Ping", - "craft_recipe_response": "Client Place Ghost Recipe", - "abilities": "Client Player Abilities", - "player_chat": "Client Player Chat", - "end_combat_event": "Client Player Combat End", - "enter_combat_event": "Client Player Combat Enter", - "death_combat_event": "Client Player Combat Kill", - "player_remove": "Client Player Info Remove", - "player_info": "Client Player Info Update", - "face_player": "Client Player Look at", - "position": "Client Player Position", - "unlock_recipes": "Client Recipe", - "entity_destroy": "Client Remove Entities", - "remove_entity_effect": "Client Remove Mob Effect", - "resource_pack_send": "Client Resource Pack", - "resource_pack_pop": "Client Resource Pack Pop", - "resource_pack_push": "Client Resource Pack Push", - "respawn": "Client Respawn", - "entity_head_rotation": "Client Rotate Head", - "multi_block_change": "Client Section Blocks Update", - "select_advancement_tab": "Client Select Advancement Tab", - "server_data": "Client Server Data", - "action_bar": "Client Set Action Bar Text", - "world_border_center": "Client Set Border Center", - "world_border_lerp_size": "Client Set Border Lerp Size", - "world_border_size": "Client Set Border Size", - "world_border_warning_delay": "Client Set Border Warning Delay", - "world_border_warning_reach": "Client Set Border Warning Distance", - "camera": "Client Set Camera", - "held_item_slot": "Client Set Carried Item", - "update_view_position": "Client Set Chunk Cache Center", - "update_view_distance": "Client Set Chunk Cache Radius", - "spawn_position": "Client Set Default Spawn Position", - "scoreboard_display_objective": "Client Set Display Objective", - "entity_metadata": "Client Set Entity Data", - "attach_entity": "Client Set Entity Link", - "entity_velocity": "Client Set Entity Motion", - "entity_equipment": "Client Set Equipment", - "experience": "Client Set Experience", - "update_health": "Client Set Health", - "scoreboard_objective": "Client Set Objective", - "set_passengers": "Client Set Passengers", - "teams": "Client Set Player Team", - "scoreboard_score": "Client Set Score", - "simulation_distance": "Client Set Simulation Distance", - "set_title_subtitle": "Client Set Subtitle Text", - "update_time": "Client Set Time", - "set_title_text": "Client Set Title Text", - "set_title_time": "Client Set Titles Animation", - "entity_sound_effect": "Client Sound Entity", - "sound_effect": "Client Sound", - "stop_sound": "Client Stop Sound", - "system_chat": "Client System Chat", - "playerlist_header": "Client Tab List", - "nbt_query_response": "Client Tag Query", - "collect": "Client Take Item Entity", - "entity_teleport": "Client Teleport Entity", - "advancements": "Client Update Advancements", - "entity_update_attributes": "Client Update Attributes", - "feature_flags": "Client Update Enabled Features", - "entity_effect": "Client Update Mob Effect", - "declare_recipes": "Client Update Recipes", - "tags": "Client Update Tags", - "chunk_batch_finished": "Client Chunk Batch Finished", - "chunk_batch_start": "Client Chunk Batch Start", - "start_configuration": "Client Start Configuration", - "finish_configuration": "Client Finish Configuration", - "registry_data": "Client Registry Data", - "reset_score": "Client Reset Score", - "ticking_state": "Client Ticking State", - "ticking_step": "Client Ticking Step", - "store_cookie": "Client Store Cookie", - "transfer": "Client Transfer", - "cookie_request": "Client Request Cookie", - "debug_sample": "Client Debug Sample", - "select_known_packs": "Client Select Known Packs", - "reset_chat": "Client Reset Chat", - "projectile_power": "Client Projectile Power" - }, - "toServer": { - "login_start": "Server Hello", - "encryption_begin": "Server Key", - "login_plugin_response": "Server Custom Query", - "login_acknowledgement": "Server Login Success ACK", - "teleport_confirm": "Server Accept Teleportation", - "query_block_nbt": "Server Block Entity Tag Query", - "set_difficulty": "Server Change Difficulty", - "message_acknowledgement": "Server Chat ACK", - "chat_command": "Server Chat Command", - "chat_command_signed": "Server Signed Chat Command", - "chat_message": "Server Chat", - "chat_session_update": "Server Chat Session Update", - "client_command": "Server Client Command", - "settings": "Server Client Information", - "tab_complete": "Server Command Suggestion", - "enchant_item": "Server Container Button Click", - "window_click": "Server Container Click", - "close_window": "Server Container Close", - "custom_payload": "Server Custom Payload", - "edit_book": "Server Edit Book", - "query_entity_nbt": "Server Entity Tag Query", - "use_entity": "Server Interact", - "generate_structure": "Server Jigsaw Generate", - "keep_alive": "Server Keep Alive", - "lock_difficulty": "Server Lock Difficulty", - "position": "Server Move Player Position", - "position_look": "Server Move Player Position & Rotation", - "look": "Server Move Player Rotation", - "flying": "Server Move Player Status-Only", - "vehicle_move": "Server Move Vehicle", - "steer_boat": "Server Paddle Boat", - "pick_item": "Server Pick Item", - "craft_recipe_request": "Server Place Recipe", - "abilities": "Server Player Abilities", - "block_dig": "Server Player Action", - "entity_action": "Server Player Command", - "steer_vehicle": "Server Player Input", - "ping": "Server Ping Request", - "pong": "Server Pong", - "recipe_book": "Server Recipe Book Change Settings", - "displayed_recipe": "Server Recipe Book Seen Recipe", - "name_item": "Server Rename Item", - "resource_pack_receive": "Server Resource Pack", - "advancement_tab": "Server Seen Advancements", - "select_trade": "Server Select Trade", - "set_beacon_effect": "Server Set Beacon", - "held_item_slot": "Server Set Carried Item", - "update_command_block": "Server Set Command Block", - "update_command_block_minecart": "Server Set Command Minecart", - "set_creative_slot": "Server Set Creative Mode Slot", - "update_jigsaw_block": "Server Set Jigsaw Block", - "update_structure_block": "Server Set Structure Block", - "update_sign": "Server Sign Update", - "arm_animation": "Server Swing", - "spectate": "Server Teleport To Entity", - "block_place": "Server Use Item on", - "use_item": "Server Use Item", - "chunk_batch_received": "Server Chunk Batch Received", - "configuration_acknowledgement": "Server Configuration ACK", - "finish_configuration": "Server Finish Configuration", - "window_slot_state_changed": "Server Container Slot State Changed", - "cookie_response": "Server Cookie Response", - "debug_sample_subscription": "Server Debug Sample Subscription", - "select_known_packs": "Server Select Known Packs" - } - } -} \ No newline at end of file