diff --git a/data/pc/1.10-pre1/proto.yml b/data/pc/1.10-pre1/proto.yml index efd8b0587..1a3e6f479 100644 --- a/data/pc/1.10-pre1/proto.yml +++ b/data/pc/1.10-pre1/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.10-pre1/protocol.json b/data/pc/1.10-pre1/protocol.json index 2a5f2ae98..c207a3d47 100644 --- a/data/pc/1.10-pre1/protocol.json +++ b/data/pc/1.10-pre1/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.10/proto.yml b/data/pc/1.10/proto.yml index 8c1da5d65..05799cce4 100644 --- a/data/pc/1.10/proto.yml +++ b/data/pc/1.10/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.13.2/client/net/minecraft/network/play/server/SPacketPlayerListItem.java#L114 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.10/protocol.json b/data/pc/1.10/protocol.json index 2a5f2ae98..c207a3d47 100644 --- a/data/pc/1.10/protocol.json +++ b/data/pc/1.10/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.11/proto.yml b/data/pc/1.11/proto.yml index 65d21db96..c39c3a014 100644 --- a/data/pc/1.11/proto.yml +++ b/data/pc/1.11/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.13.2/client/net/minecraft/network/play/server/SPacketPlayerListItem.java#L114 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.11/protocol.json b/data/pc/1.11/protocol.json index 1a207ea1c..76f1cd02a 100644 --- a/data/pc/1.11/protocol.json +++ b/data/pc/1.11/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.12-pre4/proto.yml b/data/pc/1.12-pre4/proto.yml index 08c29a450..efdcbd98e 100644 --- a/data/pc/1.12-pre4/proto.yml +++ b/data/pc/1.12-pre4/proto.yml @@ -545,37 +545,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.12-pre4/protocol.json b/data/pc/1.12-pre4/protocol.json index db4aed95f..8d4f40831 100644 --- a/data/pc/1.12-pre4/protocol.json +++ b/data/pc/1.12-pre4/protocol.json @@ -1975,7 +1975,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1987,105 +1999,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.12.1/proto.yml b/data/pc/1.12.1/proto.yml index 0fde289ca..af9930458 100644 --- a/data/pc/1.12.1/proto.yml +++ b/data/pc/1.12.1/proto.yml @@ -574,37 +574,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.12.1/protocol.json b/data/pc/1.12.1/protocol.json index 5a72cc94d..8686a7d6b 100644 --- a/data/pc/1.12.1/protocol.json +++ b/data/pc/1.12.1/protocol.json @@ -2018,7 +2018,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2030,105 +2042,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.12.2/proto.yml b/data/pc/1.12.2/proto.yml index 2f7d36b8b..2fcd8b35c 100644 --- a/data/pc/1.12.2/proto.yml +++ b/data/pc/1.12.2/proto.yml @@ -574,37 +574,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.13.2/client/net/minecraft/network/play/server/SPacketPlayerListItem.java#L114 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.12.2/protocol.json b/data/pc/1.12.2/protocol.json index 72198fef9..96a88e7a8 100644 --- a/data/pc/1.12.2/protocol.json +++ b/data/pc/1.12.2/protocol.json @@ -2018,7 +2018,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2030,105 +2042,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.12/proto.yml b/data/pc/1.12/proto.yml index f48805d6a..307a114e0 100644 --- a/data/pc/1.12/proto.yml +++ b/data/pc/1.12/proto.yml @@ -571,37 +571,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.12/protocol.json b/data/pc/1.12/protocol.json index dddd3c0ad..9d6b93ef6 100644 --- a/data/pc/1.12/protocol.json +++ b/data/pc/1.12/protocol.json @@ -2005,7 +2005,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2017,105 +2029,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.13.1/proto.yml b/data/pc/1.13.1/proto.yml index c1954ea7c..fdb124b2c 100644 --- a/data/pc/1.13.1/proto.yml +++ b/data/pc/1.13.1/proto.yml @@ -874,37 +874,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.13.1/protocol.json b/data/pc/1.13.1/protocol.json index f9ed0647c..14d015168 100644 --- a/data/pc/1.13.1/protocol.json +++ b/data/pc/1.13.1/protocol.json @@ -2684,7 +2684,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2696,105 +2708,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.13.2-pre1/proto.yml b/data/pc/1.13.2-pre1/proto.yml index 588322bbf..d7894129e 100644 --- a/data/pc/1.13.2-pre1/proto.yml +++ b/data/pc/1.13.2-pre1/proto.yml @@ -875,37 +875,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.13.2-pre1/protocol.json b/data/pc/1.13.2-pre1/protocol.json index 4caaf5f43..207c14103 100644 --- a/data/pc/1.13.2-pre1/protocol.json +++ b/data/pc/1.13.2-pre1/protocol.json @@ -2688,7 +2688,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2700,105 +2712,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.13.2-pre2/proto.yml b/data/pc/1.13.2-pre2/proto.yml index c5d06e821..8ef37ce15 100644 --- a/data/pc/1.13.2-pre2/proto.yml +++ b/data/pc/1.13.2-pre2/proto.yml @@ -875,37 +875,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.13.2-pre2/protocol.json b/data/pc/1.13.2-pre2/protocol.json index 4caaf5f43..207c14103 100644 --- a/data/pc/1.13.2-pre2/protocol.json +++ b/data/pc/1.13.2-pre2/protocol.json @@ -2688,7 +2688,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2700,105 +2712,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.13.2/proto.yml b/data/pc/1.13.2/proto.yml index 36920058e..1cbd8714f 100644 --- a/data/pc/1.13.2/proto.yml +++ b/data/pc/1.13.2/proto.yml @@ -875,37 +875,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.13.2/protocol.json b/data/pc/1.13.2/protocol.json index e7a32e704..fe3a91366 100644 --- a/data/pc/1.13.2/protocol.json +++ b/data/pc/1.13.2/protocol.json @@ -2688,7 +2688,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2700,105 +2712,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.13/proto.yml b/data/pc/1.13/proto.yml index 1441ae7a1..c53f402d5 100644 --- a/data/pc/1.13/proto.yml +++ b/data/pc/1.13/proto.yml @@ -874,37 +874,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.13.2/client/net/minecraft/network/play/server/SPacketPlayerListItem.java#L114 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.13/protocol.json b/data/pc/1.13/protocol.json index 89e0e5cea..9164b7f47 100644 --- a/data/pc/1.13/protocol.json +++ b/data/pc/1.13/protocol.json @@ -2684,7 +2684,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2696,105 +2708,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.14.1/proto.yml b/data/pc/1.14.1/proto.yml index 69a4e84b4..ec46567aa 100644 --- a/data/pc/1.14.1/proto.yml +++ b/data/pc/1.14.1/proto.yml @@ -919,37 +919,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.14.1/protocol.json b/data/pc/1.14.1/protocol.json index aba909139..fd1dbc00b 100644 --- a/data/pc/1.14.1/protocol.json +++ b/data/pc/1.14.1/protocol.json @@ -2886,7 +2886,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2898,105 +2910,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.14.3/proto.yml b/data/pc/1.14.3/proto.yml index 07ca626c6..72ac15e93 100644 --- a/data/pc/1.14.3/proto.yml +++ b/data/pc/1.14.3/proto.yml @@ -920,37 +920,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.14.3/protocol.json b/data/pc/1.14.3/protocol.json index ab214f573..486c9f775 100644 --- a/data/pc/1.14.3/protocol.json +++ b/data/pc/1.14.3/protocol.json @@ -2890,7 +2890,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2902,105 +2914,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.14.4/proto.yml b/data/pc/1.14.4/proto.yml index 19121e7c7..2a0b227bb 100644 --- a/data/pc/1.14.4/proto.yml +++ b/data/pc/1.14.4/proto.yml @@ -921,37 +921,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.14.4/protocol.json b/data/pc/1.14.4/protocol.json index 736f79f2e..e83fe149f 100644 --- a/data/pc/1.14.4/protocol.json +++ b/data/pc/1.14.4/protocol.json @@ -2894,7 +2894,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2906,105 +2918,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.14/proto.yml b/data/pc/1.14/proto.yml index 51dfcc386..1a467f1f8 100644 --- a/data/pc/1.14/proto.yml +++ b/data/pc/1.14/proto.yml @@ -919,37 +919,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.14/protocol.json b/data/pc/1.14/protocol.json index aba909139..fd1dbc00b 100644 --- a/data/pc/1.14/protocol.json +++ b/data/pc/1.14/protocol.json @@ -2886,7 +2886,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2898,105 +2910,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.15.1/proto.yml b/data/pc/1.15.1/proto.yml index 0b3851abd..7f85cc54b 100644 --- a/data/pc/1.15.1/proto.yml +++ b/data/pc/1.15.1/proto.yml @@ -924,37 +924,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.15.1/protocol.json b/data/pc/1.15.1/protocol.json index 8182d6e4f..94f6f6ee1 100644 --- a/data/pc/1.15.1/protocol.json +++ b/data/pc/1.15.1/protocol.json @@ -2913,7 +2913,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2925,105 +2937,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.15.2/proto.yml b/data/pc/1.15.2/proto.yml index be1f3edcd..91ce1204d 100644 --- a/data/pc/1.15.2/proto.yml +++ b/data/pc/1.15.2/proto.yml @@ -924,37 +924,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.15.2/protocol.json b/data/pc/1.15.2/protocol.json index 8182d6e4f..94f6f6ee1 100644 --- a/data/pc/1.15.2/protocol.json +++ b/data/pc/1.15.2/protocol.json @@ -2913,7 +2913,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2925,105 +2937,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.15/proto.yml b/data/pc/1.15/proto.yml index a9d99ca34..c136c756a 100644 --- a/data/pc/1.15/proto.yml +++ b/data/pc/1.15/proto.yml @@ -924,37 +924,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.15/protocol.json b/data/pc/1.15/protocol.json index 8182d6e4f..94f6f6ee1 100644 --- a/data/pc/1.15/protocol.json +++ b/data/pc/1.15/protocol.json @@ -2913,7 +2913,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2925,105 +2937,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.16-rc1/proto.yml b/data/pc/1.16-rc1/proto.yml index 90e688a07..988e3743f 100644 --- a/data/pc/1.16-rc1/proto.yml +++ b/data/pc/1.16-rc1/proto.yml @@ -927,37 +927,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.16-rc1/protocol.json b/data/pc/1.16-rc1/protocol.json index e416ef513..5c1892b94 100644 --- a/data/pc/1.16-rc1/protocol.json +++ b/data/pc/1.16-rc1/protocol.json @@ -2927,7 +2927,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2939,105 +2951,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.16.1/proto.yml b/data/pc/1.16.1/proto.yml index 2a880026b..09ab782e1 100644 --- a/data/pc/1.16.1/proto.yml +++ b/data/pc/1.16.1/proto.yml @@ -927,37 +927,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.16.1/protocol.json b/data/pc/1.16.1/protocol.json index e416ef513..5c1892b94 100644 --- a/data/pc/1.16.1/protocol.json +++ b/data/pc/1.16.1/protocol.json @@ -2927,7 +2927,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2939,105 +2951,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.16.2/proto.yml b/data/pc/1.16.2/proto.yml index 524b6c12f..1a220e751 100644 --- a/data/pc/1.16.2/proto.yml +++ b/data/pc/1.16.2/proto.yml @@ -943,37 +943,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.16.2/protocol.json b/data/pc/1.16.2/protocol.json index 846fe620f..5d7bae844 100644 --- a/data/pc/1.16.2/protocol.json +++ b/data/pc/1.16.2/protocol.json @@ -2930,7 +2930,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2942,105 +2954,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.16/proto.yml b/data/pc/1.16/proto.yml index a20e9c43e..be31c4d99 100644 --- a/data/pc/1.16/proto.yml +++ b/data/pc/1.16/proto.yml @@ -927,37 +927,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.16/protocol.json b/data/pc/1.16/protocol.json index e416ef513..5c1892b94 100644 --- a/data/pc/1.16/protocol.json +++ b/data/pc/1.16/protocol.json @@ -2927,7 +2927,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2939,105 +2951,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.17.1/proto.yml b/data/pc/1.17.1/proto.yml index ab746a71d..90632c25b 100644 --- a/data/pc/1.17.1/proto.yml +++ b/data/pc/1.17.1/proto.yml @@ -948,37 +948,34 @@ playerId: varint entityId: i32 message: string - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.17.1/protocol.json b/data/pc/1.17.1/protocol.json index 3ec58d2a4..d0c056cf1 100644 --- a/data/pc/1.17.1/protocol.json +++ b/data/pc/1.17.1/protocol.json @@ -2995,7 +2995,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -3007,105 +3019,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.17/proto.yml b/data/pc/1.17/proto.yml index 724869ca4..c607486b1 100644 --- a/data/pc/1.17/proto.yml +++ b/data/pc/1.17/proto.yml @@ -945,37 +945,34 @@ playerId: varint entityId: i32 message: string - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.17/protocol.json b/data/pc/1.17/protocol.json index 801891cc6..d3f3754c5 100644 --- a/data/pc/1.17/protocol.json +++ b/data/pc/1.17/protocol.json @@ -2983,7 +2983,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2995,105 +3007,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.18.2/proto.yml b/data/pc/1.18.2/proto.yml index 20a6acfc3..ec3804af2 100644 --- a/data/pc/1.18.2/proto.yml +++ b/data/pc/1.18.2/proto.yml @@ -979,37 +979,34 @@ playerId: varint entityId: i32 message: string - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.18.2/protocol.json b/data/pc/1.18.2/protocol.json index 433e1fb7e..f15a94f01 100644 --- a/data/pc/1.18.2/protocol.json +++ b/data/pc/1.18.2/protocol.json @@ -3101,7 +3101,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -3113,105 +3125,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.18/proto.yml b/data/pc/1.18/proto.yml index 03513b47c..d9cc4bd81 100644 --- a/data/pc/1.18/proto.yml +++ b/data/pc/1.18/proto.yml @@ -979,37 +979,34 @@ playerId: varint entityId: i32 message: string - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.18/protocol.json b/data/pc/1.18/protocol.json index acf6b8a7e..d58ee1057 100644 --- a/data/pc/1.18/protocol.json +++ b/data/pc/1.18/protocol.json @@ -3101,7 +3101,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -3113,105 +3125,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.19.2/proto.yml b/data/pc/1.19.2/proto.yml index 762f32239..5e84d7082 100644 --- a/data/pc/1.19.2/proto.yml +++ b/data/pc/1.19.2/proto.yml @@ -1101,69 +1101,39 @@ playerId: varint entityId: i32 message: string - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + _: ../action ? + uuid: UUID + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void - crypto: ../action ? - if 0: [ - "option", - [ - "container", - [ - { - "name": "timestamp", - "type": "i64" - }, - { - "name": "publicKey", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - }, - { - "name": "signature", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - } - ] - ] - ] - default: void + properties: []varint + key: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + ## ProfilePublicKey.java#L75 + crypto?: + # What time the following key expires at + timestamp: i64 + publicKey: ByteArray + signature: ByteArray + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.19.2/protocol.json b/data/pc/1.19.2/protocol.json index eb8eb57c9..f4e786d9c 100644 --- a/data/pc/1.19.2/protocol.json +++ b/data/pc/1.19.2/protocol.json @@ -3401,7 +3401,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -3410,33 +3422,20 @@ { "countType": "varint", "type": [ - "container", - [ - { - "name": "UUID", - "type": "UUID" - }, - { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" + "switch", + { + "compareTo": "../action", + "fields": { + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ + { + "name": "properties", + "type": [ "array", { "countType": "varint", @@ -3444,7 +3443,7 @@ "container", [ { - "name": "name", + "name": "key", "type": "string" }, { @@ -3463,66 +3462,24 @@ } ] }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" + { + "name": "gamemode", + "type": "varint" }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" + { + "name": "ping", + "type": "varint" }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" - ], - "3": [ + { + "name": "displayName", + "type": [ "option", - "string" + "nbt" ] }, - "default": "void" - } - ] - }, - { - "name": "crypto", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ + { + "name": "crypto", + "type": [ "option", [ "container", @@ -3533,31 +3490,51 @@ }, { "name": "publicKey", - "type": [ - "buffer", - { - "countType": "varint" - } - ] + "type": "ByteArray" }, { "name": "signature", - "type": [ - "buffer", - { - "countType": "varint" - } - ] + "type": "ByteArray" } ] ] ] - }, - "default": "void" - } - ] + } + ] + ], + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" } - ] + } ] } ] diff --git a/data/pc/1.19.3/proto.yml b/data/pc/1.19.3/proto.yml index 8fb3db655..0a7563477 100644 --- a/data/pc/1.19.3/proto.yml +++ b/data/pc/1.19.3/proto.yml @@ -1111,308 +1111,36 @@ packet_player_remove: players: UUID[]varint packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "string" - ] - if 33: [ - "option", - "string" - ] - if 34: [ - "option", - "string" - ] - if 35: [ - "option", - "string" - ] - if 36: [ - "option", - "string" - ] - if 37: [ - "option", - "string" - ] - if 38: [ - "option", - "string" - ] - if 39: [ - "option", - "string" - ] - if 40: [ - "option", - "string" - ] - if 41: [ - "option", - "string" - ] - if 42: [ - "option", - "string" - ] - if 43: [ - "option", - "string" - ] - if 44: [ - "option", - "string" - ] - if 45: [ - "option", - "string" - ] - if 46: [ - "option", - "string" - ] - if 47: [ - "option", - "string" - ] - if 48: [ - "option", - "string" - ] - if 49: [ - "option", - "string" - ] - if 50: [ - "option", - "string" - ] - if 51: [ - "option", - "string" - ] - if 52: [ - "option", - "string" - ] - if 53: [ - "option", - "string" - ] - if 54: [ - "option", - "string" - ] - if 55: [ - "option", - "string" - ] - if 56: [ - "option", - "string" - ] - if 57: [ - "option", - "string" - ] - if 58: [ - "option", - "string" - ] - if 59: [ - "option", - "string" - ] - if 60: [ - "option", - "string" - ] - if 61: [ - "option", - "string" - ] - if 62: [ - "option", - "string" - ] - if 63: [ - "option", - "string" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void packet_position: x: f64 diff --git a/data/pc/1.19.3/protocol.json b/data/pc/1.19.3/protocol.json index 9bfafdbd2..fce6e8c0e 100644 --- a/data/pc/1.19.3/protocol.json +++ b/data/pc/1.19.3/protocol.json @@ -3455,7 +3455,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -3475,40 +3487,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -3519,40 +3500,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -3563,40 +3513,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3607,40 +3526,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -3651,40 +3539,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3695,135 +3552,11 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "string" - ], - "33": [ - "option", - "string" - ], - "34": [ - "option", - "string" - ], - "35": [ - "option", - "string" - ], - "36": [ - "option", - "string" - ], - "37": [ - "option", - "string" - ], - "38": [ - "option", - "string" - ], - "39": [ - "option", - "string" - ], - "40": [ - "option", - "string" - ], - "41": [ - "option", - "string" - ], - "42": [ - "option", - "string" - ], - "43": [ - "option", - "string" - ], - "44": [ - "option", - "string" - ], - "45": [ - "option", - "string" - ], - "46": [ - "option", - "string" - ], - "47": [ - "option", - "string" - ], - "48": [ - "option", - "string" - ], - "49": [ - "option", - "string" - ], - "50": [ - "option", - "string" - ], - "51": [ - "option", - "string" - ], - "52": [ - "option", - "string" - ], - "53": [ - "option", - "string" - ], - "54": [ - "option", - "string" - ], - "55": [ + "1": [ "option", - "string" - ], - "56": [ - "option", - "string" - ], - "57": [ - "option", - "string" - ], - "58": [ - "option", - "string" - ], - "59": [ - "option", - "string" - ], - "60": [ - "option", - "string" - ], - "61": [ - "option", - "string" - ], - "62": [ - "option", - "string" - ], - "63": [ - "option", - "string" + "anonymousNbt" ] }, "default": "void" diff --git a/data/pc/1.19.4/proto.yml b/data/pc/1.19.4/proto.yml index 4bb8bc525..05e80371b 100644 --- a/data/pc/1.19.4/proto.yml +++ b/data/pc/1.19.4/proto.yml @@ -1161,308 +1161,36 @@ packet_player_remove: players: UUID[]varint packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "string" - ] - if 33: [ - "option", - "string" - ] - if 34: [ - "option", - "string" - ] - if 35: [ - "option", - "string" - ] - if 36: [ - "option", - "string" - ] - if 37: [ - "option", - "string" - ] - if 38: [ - "option", - "string" - ] - if 39: [ - "option", - "string" - ] - if 40: [ - "option", - "string" - ] - if 41: [ - "option", - "string" - ] - if 42: [ - "option", - "string" - ] - if 43: [ - "option", - "string" - ] - if 44: [ - "option", - "string" - ] - if 45: [ - "option", - "string" - ] - if 46: [ - "option", - "string" - ] - if 47: [ - "option", - "string" - ] - if 48: [ - "option", - "string" - ] - if 49: [ - "option", - "string" - ] - if 50: [ - "option", - "string" - ] - if 51: [ - "option", - "string" - ] - if 52: [ - "option", - "string" - ] - if 53: [ - "option", - "string" - ] - if 54: [ - "option", - "string" - ] - if 55: [ - "option", - "string" - ] - if 56: [ - "option", - "string" - ] - if 57: [ - "option", - "string" - ] - if 58: [ - "option", - "string" - ] - if 59: [ - "option", - "string" - ] - if 60: [ - "option", - "string" - ] - if 61: [ - "option", - "string" - ] - if 62: [ - "option", - "string" - ] - if 63: [ - "option", - "string" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void packet_position: x: f64 diff --git a/data/pc/1.19.4/protocol.json b/data/pc/1.19.4/protocol.json index ecd0cf60f..dfa3d1048 100644 --- a/data/pc/1.19.4/protocol.json +++ b/data/pc/1.19.4/protocol.json @@ -3564,7 +3564,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -3584,40 +3596,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -3628,40 +3609,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -3672,40 +3622,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3716,40 +3635,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -3760,40 +3648,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3804,135 +3661,11 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "string" - ], - "33": [ - "option", - "string" - ], - "34": [ - "option", - "string" - ], - "35": [ - "option", - "string" - ], - "36": [ - "option", - "string" - ], - "37": [ - "option", - "string" - ], - "38": [ - "option", - "string" - ], - "39": [ - "option", - "string" - ], - "40": [ - "option", - "string" - ], - "41": [ - "option", - "string" - ], - "42": [ - "option", - "string" - ], - "43": [ - "option", - "string" - ], - "44": [ - "option", - "string" - ], - "45": [ - "option", - "string" - ], - "46": [ - "option", - "string" - ], - "47": [ - "option", - "string" - ], - "48": [ - "option", - "string" - ], - "49": [ - "option", - "string" - ], - "50": [ - "option", - "string" - ], - "51": [ - "option", - "string" - ], - "52": [ - "option", - "string" - ], - "53": [ - "option", - "string" - ], - "54": [ - "option", - "string" - ], - "55": [ + "1": [ "option", - "string" - ], - "56": [ - "option", - "string" - ], - "57": [ - "option", - "string" - ], - "58": [ - "option", - "string" - ], - "59": [ - "option", - "string" - ], - "60": [ - "option", - "string" - ], - "61": [ - "option", - "string" - ], - "62": [ - "option", - "string" - ], - "63": [ - "option", - "string" + "anonymousNbt" ] }, "default": "void" diff --git a/data/pc/1.19/proto.yml b/data/pc/1.19/proto.yml index 01a11e392..67e643d43 100644 --- a/data/pc/1.19/proto.yml +++ b/data/pc/1.19/proto.yml @@ -28,6 +28,7 @@ restBuffer: native nbt: native optionalNbt: native + ByteArray: ["buffer", { "countType": "varint" }] string: [ "pstring", { @@ -209,6 +210,13 @@ y: i16 type: varint nbtData: optionalNbt + game_profile: + uuid: UUID + name: string + properties: []varint + name: string + value: string + signature?: string command_node: flags: [ "bitfield", @@ -557,13 +565,7 @@ "countType": "varint" } ] - packet_success: - uuid: UUID - username: string - properties: []varint - name: string - value: string - signature?: string + packet_success: game_profile packet_compress: threshold: varint packet_login_plugin_request: @@ -1063,69 +1065,39 @@ playerId: varint entityId: i32 message: string + # MC: ClientboundPlayerInfoPacket packet_player_info: - action: varint + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void - crypto: ../action ? - if 0: [ - "option", - [ - "container", - [ - { - "name": "timestamp", - "type": "i64" - }, - { - "name": "publicKey", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - }, - { - "name": "signature", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - } - ] - ] - ] - default: void + properties: []varint + key: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + ## ProfilePublicKey.java#L75 + crypto?: + # What time the following key expires at + timestamp: i64 + publicKey: ByteArray + signature: ByteArray + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.19/protocol.json b/data/pc/1.19/protocol.json index caa52038f..a9520d6ee 100644 --- a/data/pc/1.19/protocol.json +++ b/data/pc/1.19/protocol.json @@ -27,6 +27,12 @@ "restBuffer": "native", "nbt": "native", "optionalNbt": "native", + "ByteArray": [ + "buffer", + { + "countType": "varint" + } + ], "string": [ "pstring", { @@ -474,6 +480,48 @@ } ] ], + "game_profile": [ + "container", + [ + { + "name": "uuid", + "type": "UUID" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", + { + "countType": "varint", + "type": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] + ] + } + ] + } + ] + ], "command_node": [ "container", [ @@ -1205,48 +1253,7 @@ } ] ], - "packet_success": [ - "container", - [ - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "username", - "type": "string" - }, - { - "name": "properties", - "type": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, - { - "name": "signature", - "type": [ - "option", - "string" - ] - } - ] - ] - } - ] - } - ] - ], + "packet_success": "game_profile", "packet_compress": [ "container", [ @@ -3284,7 +3291,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -3296,147 +3315,124 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "key", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + }, + { + "name": "crypto", + "type": [ + "option", + [ + "container", + [ + { + "name": "timestamp", + "type": "i64" + }, + { + "name": "publicKey", + "type": "ByteArray" + }, + { + "name": "signature", + "type": "ByteArray" + } + ] + ] + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" - } - ] - }, - { - "name": "crypto", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", + "update_game_mode": [ + "container", [ - "container", - [ - { - "name": "timestamp", - "type": "i64" - }, - { - "name": "publicKey", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - }, - { - "name": "signature", - "type": [ - "buffer", - { - "countType": "varint" - } - ] - } - ] + { + "name": "gamemode", + "type": "varint" + } ] - ] - }, - "default": "void" + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.20.2/proto.yml b/data/pc/1.20.2/proto.yml index b6a9178e6..6dcda2a09 100644 --- a/data/pc/1.20.2/proto.yml +++ b/data/pc/1.20.2/proto.yml @@ -1240,308 +1240,36 @@ packet_player_remove: players: UUID[]varint packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "string" - ] - if 33: [ - "option", - "string" - ] - if 34: [ - "option", - "string" - ] - if 35: [ - "option", - "string" - ] - if 36: [ - "option", - "string" - ] - if 37: [ - "option", - "string" - ] - if 38: [ - "option", - "string" - ] - if 39: [ - "option", - "string" - ] - if 40: [ - "option", - "string" - ] - if 41: [ - "option", - "string" - ] - if 42: [ - "option", - "string" - ] - if 43: [ - "option", - "string" - ] - if 44: [ - "option", - "string" - ] - if 45: [ - "option", - "string" - ] - if 46: [ - "option", - "string" - ] - if 47: [ - "option", - "string" - ] - if 48: [ - "option", - "string" - ] - if 49: [ - "option", - "string" - ] - if 50: [ - "option", - "string" - ] - if 51: [ - "option", - "string" - ] - if 52: [ - "option", - "string" - ] - if 53: [ - "option", - "string" - ] - if 54: [ - "option", - "string" - ] - if 55: [ - "option", - "string" - ] - if 56: [ - "option", - "string" - ] - if 57: [ - "option", - "string" - ] - if 58: [ - "option", - "string" - ] - if 59: [ - "option", - "string" - ] - if 60: [ - "option", - "string" - ] - if 61: [ - "option", - "string" - ] - if 62: [ - "option", - "string" - ] - if 63: [ - "option", - "string" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void packet_position: x: f64 diff --git a/data/pc/1.20.2/protocol.json b/data/pc/1.20.2/protocol.json index dcdb1a049..8daee6995 100644 --- a/data/pc/1.20.2/protocol.json +++ b/data/pc/1.20.2/protocol.json @@ -3811,7 +3811,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -3831,40 +3843,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -3875,40 +3856,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -3919,40 +3869,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3963,40 +3882,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -4007,40 +3895,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -4051,135 +3908,11 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "string" - ], - "33": [ - "option", - "string" - ], - "34": [ - "option", - "string" - ], - "35": [ - "option", - "string" - ], - "36": [ - "option", - "string" - ], - "37": [ - "option", - "string" - ], - "38": [ - "option", - "string" - ], - "39": [ - "option", - "string" - ], - "40": [ - "option", - "string" - ], - "41": [ - "option", - "string" - ], - "42": [ - "option", - "string" - ], - "43": [ - "option", - "string" - ], - "44": [ - "option", - "string" - ], - "45": [ - "option", - "string" - ], - "46": [ - "option", - "string" - ], - "47": [ - "option", - "string" - ], - "48": [ - "option", - "string" - ], - "49": [ - "option", - "string" - ], - "50": [ - "option", - "string" - ], - "51": [ - "option", - "string" - ], - "52": [ - "option", - "string" - ], - "53": [ - "option", - "string" - ], - "54": [ - "option", - "string" - ], - "55": [ + "1": [ "option", - "string" - ], - "56": [ - "option", - "string" - ], - "57": [ - "option", - "string" - ], - "58": [ - "option", - "string" - ], - "59": [ - "option", - "string" - ], - "60": [ - "option", - "string" - ], - "61": [ - "option", - "string" - ], - "62": [ - "option", - "string" - ], - "63": [ - "option", - "string" + "anonymousNbt" ] }, "default": "void" diff --git a/data/pc/1.20.3/proto.yml b/data/pc/1.20.3/proto.yml index 2bc102013..e5bc2dec4 100644 --- a/data/pc/1.20.3/proto.yml +++ b/data/pc/1.20.3/proto.yml @@ -23,6 +23,7 @@ entityMetadataLoop: native topBitSetTerminatedArray: native bitfield: native + bitflags: native container: native switch: native void: native @@ -30,12 +31,10 @@ restBuffer: native anonymousNbt: native anonOptionalNbt: native - string: [ - "pstring", - { - "countType": "varint" - } - ] + registryEntryHolder: native + registryEntryHolderSet: native + ByteArray: ["buffer", { "countType": "varint" }] + string: ["pstring", { "countType": "varint" }] vec3f: x: f32 y: f32 @@ -57,14 +56,119 @@ itemId: varint itemCount: i8 nbtData: anonOptionalNbt - particle: - particleId: varint - data: [ - "particleData", - { - "compareTo": "particleId" - } - ] + Particle: + # See client/net/minecraft/core/particles/ParticleTypes.java + type: varint => + - angry_villager + - block + - block_marker + - bubble + - cloud + - crit + - damage_indicator + - dragon_breath + - dripping_lava + - falling_lava + - landing_lava + - dripping_water + - falling_water + - dust + - dust_color_transition + - effect + - elder_guardian + - enchanted_hit + - enchant + - end_rod + - entity_effect + - explosion_emitter + - explosion + - gust + - small_gust + - gust_emitter_large + - gust_emitter_small + - sonic_boom + - falling_dust + - firework + - fishing + - flame + - infested + - cherry_leaves + - sculk_soul + - sculk_charge + - sculk_charge_pop + - soul_fire_flame + - soul + - flash + - happy_villager + - composter + - heart + - instant_effect + - item + - vibration + - item_slime + - item_cobweb + - item_snowball + - large_smoke + - lava + - mycelium + - note + - poof + - portal + - rain + - smoke + - white_smoke + - sneeze + - spit + - squid_ink + - sweep_attack + - totem_of_undying + - underwater + - splash + - witch + - bubble_pop + - current_down + - bubble_column_up + - nautilus + - dolphin + - campfire_cosy_smoke + - campfire_signal_smoke + - dripping_honey + - falling_honey + - landing_honey + - falling_nectar + - falling_spore_blossom + - ash + - crimson_spore + - warped_spore + - spore_blossom_air + - dripping_obsidian_tear + - falling_obsidian_tear + - landing_obsidian_tear + - reverse_portal + - white_ash + - small_flame + - snowflake + - dripping_dripstone_lava + - falling_dripstone_lava + - dripping_dripstone_water + - falling_dripstone_water + - glow_squid_ink + - glow + - wax_on + - wax_off + - electric_spark + - scrape + - shriek + - egg_crack + - dust_plume + - trial_spawner_detected_player + - trial_spawner_detected_player_ominous + - vault_connection + - dust_pillar + - ominous_spawning + - raid_omen + - trial_omen + data: particleData: $compareTo ? if 2: blockState: varint @@ -1334,308 +1438,36 @@ players: UUID[]varint # MC: ClientboundPlayerInfoUpdatePacket packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "anonymousNbt" - ] - if 33: [ - "option", - "anonymousNbt" - ] - if 34: [ - "option", - "anonymousNbt" - ] - if 35: [ - "option", - "anonymousNbt" - ] - if 36: [ - "option", - "anonymousNbt" - ] - if 37: [ - "option", - "anonymousNbt" - ] - if 38: [ - "option", - "anonymousNbt" - ] - if 39: [ - "option", - "anonymousNbt" - ] - if 40: [ - "option", - "anonymousNbt" - ] - if 41: [ - "option", - "anonymousNbt" - ] - if 42: [ - "option", - "anonymousNbt" - ] - if 43: [ - "option", - "anonymousNbt" - ] - if 44: [ - "option", - "anonymousNbt" - ] - if 45: [ - "option", - "anonymousNbt" - ] - if 46: [ - "option", - "anonymousNbt" - ] - if 47: [ - "option", - "anonymousNbt" - ] - if 48: [ - "option", - "anonymousNbt" - ] - if 49: [ - "option", - "anonymousNbt" - ] - if 50: [ - "option", - "anonymousNbt" - ] - if 51: [ - "option", - "anonymousNbt" - ] - if 52: [ - "option", - "anonymousNbt" - ] - if 53: [ - "option", - "anonymousNbt" - ] - if 54: [ - "option", - "anonymousNbt" - ] - if 55: [ - "option", - "anonymousNbt" - ] - if 56: [ - "option", - "anonymousNbt" - ] - if 57: [ - "option", - "anonymousNbt" - ] - if 58: [ - "option", - "anonymousNbt" - ] - if 59: [ - "option", - "anonymousNbt" - ] - if 60: [ - "option", - "anonymousNbt" - ] - if 61: [ - "option", - "anonymousNbt" - ] - if 62: [ - "option", - "anonymousNbt" - ] - if 63: [ - "option", - "anonymousNbt" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void # MC: ClientboundPlayerPositionPacket packet_position: diff --git a/data/pc/1.20.3/protocol.json b/data/pc/1.20.3/protocol.json index b3310b22c..0a4490872 100644 --- a/data/pc/1.20.3/protocol.json +++ b/data/pc/1.20.3/protocol.json @@ -28,6 +28,12 @@ "restBuffer": "native", "anonymousNbt": "native", "anonOptionalNbt": "native", + "ByteArray": [ + "buffer", + { + "countType": "varint" + } + ], "string": [ "pstring", { @@ -3881,7 +3887,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -3901,40 +3919,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -3945,40 +3932,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -3989,40 +3945,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -4033,40 +3958,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -4077,40 +3971,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -4121,133 +3984,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "anonymousNbt" - ], - "33": [ - "option", - "anonymousNbt" - ], - "34": [ - "option", - "anonymousNbt" - ], - "35": [ - "option", - "anonymousNbt" - ], - "36": [ - "option", - "anonymousNbt" - ], - "37": [ - "option", - "anonymousNbt" - ], - "38": [ - "option", - "anonymousNbt" - ], - "39": [ - "option", - "anonymousNbt" - ], - "40": [ - "option", - "anonymousNbt" - ], - "41": [ - "option", - "anonymousNbt" - ], - "42": [ - "option", - "anonymousNbt" - ], - "43": [ - "option", - "anonymousNbt" - ], - "44": [ - "option", - "anonymousNbt" - ], - "45": [ - "option", - "anonymousNbt" - ], - "46": [ - "option", - "anonymousNbt" - ], - "47": [ - "option", - "anonymousNbt" - ], - "48": [ - "option", - "anonymousNbt" - ], - "49": [ - "option", - "anonymousNbt" - ], - "50": [ - "option", - "anonymousNbt" - ], - "51": [ - "option", - "anonymousNbt" - ], - "52": [ - "option", - "anonymousNbt" - ], - "53": [ - "option", - "anonymousNbt" - ], - "54": [ - "option", - "anonymousNbt" - ], - "55": [ - "option", - "anonymousNbt" - ], - "56": [ - "option", - "anonymousNbt" - ], - "57": [ - "option", - "anonymousNbt" - ], - "58": [ - "option", - "anonymousNbt" - ], - "59": [ - "option", - "anonymousNbt" - ], - "60": [ - "option", - "anonymousNbt" - ], - "61": [ - "option", - "anonymousNbt" - ], - "62": [ - "option", - "anonymousNbt" - ], - "63": [ + "1": [ "option", "anonymousNbt" ] diff --git a/data/pc/1.20.5/proto.yml b/data/pc/1.20.5/proto.yml index 23c0951b7..8c034dec7 100644 --- a/data/pc/1.20.5/proto.yml +++ b/data/pc/1.20.5/proto.yml @@ -23,6 +23,7 @@ entityMetadataLoop: native topBitSetTerminatedArray: native bitfield: native + bitflags: native container: native switch: native void: native @@ -30,14 +31,10 @@ restBuffer: native anonymousNbt: native anonOptionalNbt: native - arrayWithLengthOffset: native + registryEntryHolder: native + registryEntryHolderSet: native ByteArray: ["buffer", { "countType": "varint" }] - string: [ - "pstring", - { - "countType": "varint" - } - ] + string: ["pstring", { "countType": "varint" }] vec3f: x: f32 y: f32 @@ -51,69 +48,74 @@ x: f64 y: f64 z: f64 - + IDSet: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "ids", type: "varint" } + }] + ContainerID: u8 SlotComponentType: varint => - - custom_data - - max_stack_size - - max_damage - - damage - - unbreakable - - custom_name - - item_name - - lore - - rarity - - enchantments - - can_place_on - - can_break - - attribute_modifiers - - custom_model_data - - hide_additional_tooltip - - hide_tooltip - - repair_cost - - creative_slot_lock - - enchantment_glint_override - - intangible_projectile - - food - - fire_resistant - - tool - - stored_enchantments - - dyed_color - - map_color - - map_id - - map_decorations - - map_post_processing - - charged_projectiles - - bundle_contents - - potion_contents - - suspicious_stew_effects - - writable_book_content - - written_book_content - - trim - - debug_stick_state - - entity_data - - bucket_entity_data - - block_entity_data - - instrument - - ominous_bottle_amplifier - - recipes - - lodestone_tracker - - firework_explosion - - fireworks - - profile - - note_block_sound - - banner_patterns - - base_color - - pot_decorations - - container - - block_state - - bees - - lock - - container_loot + - custom_data + - max_stack_size + - max_damage + - damage + - unbreakable + - custom_name + - item_name + - lore + - rarity + - enchantments + - can_place_on + - can_break + - attribute_modifiers + - custom_model_data + - hide_additional_tooltip + - hide_tooltip + - repair_cost + - creative_slot_lock + - enchantment_glint_override + - intangible_projectile + - food + - fire_resistant + - tool + - stored_enchantments + - dyed_color + - map_color + - map_id + - map_decorations + - map_post_processing + - charged_projectiles + - bundle_contents + - potion_contents + - suspicious_stew_effects + - writable_book_content + - written_book_content + - trim + - debug_stick_state + - entity_data + - bucket_entity_data + - block_entity_data + - instrument + - ominous_bottle_amplifier + - recipes + - lodestone_tracker + - firework_explosion + - fireworks + - profile + - note_block_sound + - banner_patterns + - base_color + - pot_decorations + - container + - block_state + - bees + - lock + - container_loot SlotComponent: type: SlotComponentType + ## Ref: client/net/minecraft/core/component/DataComponents.java data: type ? - # TODO: look into how nbt works here + ## TODO: look into how nbt works here if custom_data: anonymousNbt if max_stack_size: varint if max_damage: varint @@ -133,12 +135,12 @@ level: varint showTooltip: bool if can_place_on or can_break: - predicates: BlockPredicate[]varint + predicates: ItemBlockPredicate[]varint showTooltip: bool if attribute_modifiers: attributes: []varint typeId: varint - uniqueId: UUID + uuid: UUID name: string value: f64 operation: varint => @@ -164,18 +166,11 @@ if creative_slot_lock: void if enchantment_glint_override: bool if intangible_projectile: void - # Name Type Description - # Nutrition VarInt Non-negative - # Saturation Modifier Float How much saturation will be given after consuming the item. - # Can Always Eat Boolean Whether the item can always be eaten, even at full hunger. - # Seconds To Eat Float How long it takes to consume the item. - # Using converts to Slot Data This specifies the item produced after consuming the current item. In the Notchian server, this is used for stews, which turn into bowls. Set this to Air if the item should be consumed normally without leaving any other item after. - # Number of effects VarInt Number of elements in the following array. - # Effect Type ID Array Potion Effect The potion effect. See Potion Effect. - # Probability Float The probability for this effect to be chosen. if food: nutrition: varint + # How much saturation will be given after consuming the item. saturationModifier: f32 + # Whether the item can always be eaten, even at full hunger. canAlwaysEat: bool secondsToEat: f32 usingConvertsTo: Slot @@ -183,34 +178,22 @@ effect: varint probability: f32 if fire_resistant: void - # Name Type Description - # Number of Rules VarInt The number of elements in the following array. - # Rule - # Blocks Array Block Set The block this rule applies to. See Block Set. - # Has Speed Boolean - # Speed Optional Float The speed at which the tool breaks this rules' blocks. Only present if Has Speed is true. - # Has Correct Drop For Blocks Boolean - # Correct Drop For Blocks Optional Boolean Whether items should drop only if this is the correct tool. Only present if Has Correct Drop For Blocks is true. - # Default Mining Speed Float The mining speed in case none of the previous rule were matched. - # Damage Per Block VarInt The amount of damage the item takes per block break. if tool: rules: []varint - blocks: BlockSet[]varint - hasSpeed: bool - speed: f32 - hasCorrectDropForBlocks: bool - correctDropForBlocks: bool + blocks: IDSet + # The speed at which the tool breaks this rules' blocks. + speed?: f32 + # Whether items should drop only if this is the correct tool. + correctDropForBlocks?: bool + # The mining speed in case none of the previous rule were matched. defaultMiningSpeed: f32 damagePerBlock: varint - # Name Type Description - # Number of enchantments VarInt Number of elements in the following array. - # Enchantment Type ID Array VarInt Enum The ID of the enchantment in the enchantment registry. - # Level VarInt The level of the enchantment. - # Show In Tooltip Boolean Whether the list of enchantments should be shown on the item's tooltip. if stored_enchantments: enchantments: []varint + # The ID of the enchantment in the enchantment registry. id: varint level: varint + # Whether the list of enchantments should be shown on the item's tooltip. showInTooltip: bool if dyed_color: color: varint @@ -223,53 +206,30 @@ projectiles: Slot[]varint if bundle_contents: contents: Slot[]varint - # Name Type Description - # Has Potion ID Boolean Whether this potion has an ID in the potion registry. If true, it has the default effects associated with the potion type. - # Potion ID Optional VarInt The ID of the potion type in the potion registry. Only present if Has Potion ID is true. - # Has Custom Color Boolean Whether this potion has a custom color. If false, it uses the default color associated with the potion type. - # Custom Color Optional Int The RGB components of the color, encoded as an integer. Only present if Has Custom Color is true. - # Number Of Custom Effects VarInt The number of elements in the following array. - # Custom Effects Array of Potion Effect Any custom effects the potion might have. See Potion Effect. if potion_contents: - hasPotionId: bool - potionId: optvarint - hasCustomColor: bool - customColor: optvarint - customEffects: []varint - effect: varint - details: EffectDetail - # Name Type Description - # Number Of Effects VarInt Number of elements in the following array. - # Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry. - # Duration VarInt The duration of the effect. + # True if this potion has an ID in the potion registry--it has the default effects associated with the potion type. + potionId?: varint + # The RGB components of the color, encoded as an integer. + customColor?: varint + customEffects: ItemPotionEffect[]varint + customName: string if suspicious_stew_effects: effects: []varint + # The ID of the effect in the potion effect type registry. effect: varint + # The duration of the effect. duration: varint - # Name Type Description - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) String (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. if writable_book_content: - pages: BookPage[]varint - # Name Type Description - # Raw Title String (32) The raw title of the book. - # Has Filtered Title Boolean - # Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true. - # Author String - # Generation VarInt - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) TextComponent (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. - # Resolved Boolean Whether entity selectors have already been resolved. + # Max 100 pages + pages: ItemBookPage[]varint if written_book_content: + # The raw title of the book, up to 32 characters. rawTitle: string filteredTitle?: string author: string generation: varint - pages: BookPage[]varint + # Max 100 pages + pages: ItemBookPage[]varint # Whether entity selectors have already been resolved. resolved: bool # Name Type Description @@ -334,53 +294,28 @@ range: f32 if ominous_bottle_amplifier: varint if recipes: anonymousNbt - # Name Type Description - # Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly. - # Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true. - # Position Position The position the compass points to. Only present if Has Global Position is true. - # Tracked Boolean Whether the component is removed when the associated lodestone is broken. if lodestone_tracker: + # Specified if this lodestone points to a position; otherwise it spins randomly. globalPosition?: dimension: string - position: vec3f + # The position the compass points to. Only present if Has Global Position is true. + position: position + # Whether the component is removed when the associated lodestone is broken. tracked: bool - # Name Type Description - # Shape VarInt Enum Can be one of the following: - # 0 - Small ball - # 1 - Large ball - # 2 - Star - # 3 - Creeper - # 4 - Burst - # Number Of Colors VarInt The number of elements in the following array. - # Colors Array of Int The RGB components of the color, encoded as an integer. - # Number Of Fade Colors VarInt The number of elements in the following array. - # Fade Colors Array of Int The RGB components of the color, encoded as an integer. - # Has Trail Boolean - # Has Twinkle Boolean - if firework_explosion: FireworkExplosion + if firework_explosion: ItemFireworkExplosion if fireworks: flightDuration: varint - explosions: FireworkExplosion[]varint - # Name Type Description - # Has Name Boolean - # Name Optional String (16) Only present if Has Name is true. - # Has Unique ID Boolean - # Unique ID Optional UUID Only present if Has Unique ID is true. - # Number of Properties VarInt Number of elements in the following array. - # Property Name Array String (64) - # Value String - # Has Signature Boolean - # Signature String (1024) Only present if Has Signature is true. + explosions: ItemFireworkExplosion[]varint if profile: - hasName: bool - name: string - hasUniqueId: bool - uniqueId: UUID + # If the profile has a name, max 16 characters. + name?: string + uuid?: UUID properties: []varint + # Max 64 characters property: string value: string - hasSignature: bool - signature: string + # Max 1024 characters + signature?: string if note_block_sound: string # Name Type Description # Number of Layers VarInt Number of elements in the following array. @@ -426,110 +361,36 @@ if lock: anonymousNbt if container_loot: anonymousNbt - Slot: - itemCount: i8 - _: itemCount ? - if 0: void - default: - itemId: varint -# https://wiki.vg/Slot_Data#Structured_components -# + public static final DataComponentType CUSTOM_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final IntComponentType MAX_STACK_SIZE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final IntComponentType MAX_DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final IntComponentType DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final BooleanComponentType UNBREAKABLE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new); -# + public static final DataComponentType CUSTOM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new); -# + public static final DataComponentType ITEM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new); -# + public static final DataComponentType> LORE = new DataComponentType<>(listReader(ItemCodecHelper::readComponent), listWriter(ItemCodecHelper::writeComponent), ObjectDataComponent::new); -# + public static final IntComponentType RARITY = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new); -# + public static final DataComponentType CAN_PLACE_ON = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new); -# + public static final DataComponentType CAN_BREAK = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new); -# + public static final DataComponentType ATTRIBUTE_MODIFIERS = new DataComponentType<>(ItemCodecHelper::readItemAttributeModifiers, ItemCodecHelper::writeItemAttributeModifiers, ObjectDataComponent::new); -# + public static final IntComponentType CUSTOM_MODEL_DATA = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType HIDE_ADDITIONAL_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final DataComponentType HIDE_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final IntComponentType REPAIR_COST = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType CREATIVE_SLOT_LOCK = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final BooleanComponentType ENCHANTMENT_GLINT_OVERRIDE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new); -# + public static final DataComponentType INTANGIBLE_PROJECTILE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType FOOD = new DataComponentType<>(ItemCodecHelper::readFoodProperties, ItemCodecHelper::writeFoodProperties, ObjectDataComponent::new); -# + public static final DataComponentType FIRE_RESISTANT = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final DataComponentType TOOL = new DataComponentType<>(ItemCodecHelper::readToolData, ItemCodecHelper::writeToolData, ObjectDataComponent::new); -# + public static final DataComponentType STORED_ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new); -# + public static final DataComponentType DYED_COLOR = new DataComponentType<>(ItemCodecHelper::readDyedItemColor, ItemCodecHelper::writeDyedItemColor, ObjectDataComponent::new); -# + public static final IntComponentType MAP_COLOR = new IntComponentType((helper, input) -> input.readInt(), (helper, output, value) -> output.writeInt(value), IntDataComponent::new); -# + public static final IntComponentType MAP_ID = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType MAP_DECORATIONS = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final IntComponentType MAP_POST_PROCESSING = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType> CHARGED_PROJECTILES = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new); -# + public static final DataComponentType> BUNDLE_CONTENTS = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new); -# + public static final DataComponentType POTION_CONTENTS = new DataComponentType<>(ItemCodecHelper::readPotionContents, ItemCodecHelper::writePotionContents, ObjectDataComponent::new); -# + public static final DataComponentType> SUSPICIOUS_STEW_EFFECTS = new DataComponentType<>(listReader(ItemCodecHelper::readStewEffect), listWriter(ItemCodecHelper::writeStewEffect), ObjectDataComponent::new); -# + public static final DataComponentType WRITABLE_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWritableBookContent, ItemCodecHelper::writeWritableBookContent, ObjectDataComponent::new); -# + public static final DataComponentType WRITTEN_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWrittenBookContent, ItemCodecHelper::writeWrittenBookContent, ObjectDataComponent::new); -# + public static final DataComponentType TRIM = new DataComponentType<>(ItemCodecHelper::readArmorTrim, ItemCodecHelper::writeArmorTrim, ObjectDataComponent::new); -# + public static final DataComponentType DEBUG_STICK_STATE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType BUCKET_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType BLOCK_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType> INSTRUMENT = new DataComponentType<>(ItemCodecHelper::readInstrument, ItemCodecHelper::writeInstrument, ObjectDataComponent::new); -# + public static final IntComponentType OMINOUS_BOTTLE_AMPLIFIER = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType RECIPES = new DataComponentType<>(ItemCodecHelper::readRecipes, ItemCodecHelper::writeRecipes, ObjectDataComponent::new); -# + public static final DataComponentType LODESTONE_TRACKER = new DataComponentType<>(ItemCodecHelper::readLodestoneTarget, ItemCodecHelper::writeLodestoneTarget, ObjectDataComponent::new); -# + public static final DataComponentType FIREWORK_EXPLOSION = new DataComponentType<>(ItemCodecHelper::readFireworkExplosion, ItemCodecHelper::writeFireworkExplosion, ObjectDataComponent::new); -# + public static final DataComponentType FIREWORKS = new DataComponentType<>(ItemCodecHelper::readFireworks, ItemCodecHelper::writeFireworks, ObjectDataComponent::new); -# + public static final DataComponentType PROFILE = new DataComponentType<>(ItemCodecHelper::readResolvableProfile, ItemCodecHelper::writeResolvableProfile, ObjectDataComponent::new); -# + public static final DataComponentType NOTE_BLOCK_SOUND = new DataComponentType<>(ItemCodecHelper::readResourceLocation, ItemCodecHelper::writeResourceLocation, ObjectDataComponent::new); -# + public static final DataComponentType> BANNER_PATTERNS = new DataComponentType<>(listReader(ItemCodecHelper::readBannerPatternLayer), listWriter(ItemCodecHelper::writeBannerPatternLayer), ObjectDataComponent::new); -# + public static final IntComponentType BASE_COLOR = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType> POT_DECORATIONS = new DataComponentType<>(listReader(ItemCodecHelper::readVarInt), listWriter(ItemCodecHelper::writeVarInt), ObjectDataComponent::new); -# + public static final DataComponentType> CONTAINER = new DataComponentType<>(listReader(ItemCodecHelper::readOptionalItemStack), listWriter(MinecraftCodecHelper::writeOptionalItemStack), ObjectDataComponent::new); -# + public static final DataComponentType BLOCK_STATE = new DataComponentType<>(ItemCodecHelper::readBlockStateProperties, ItemCodecHelper::writeBlockStateProperties, ObjectDataComponent::new); -# + public static final DataComponentType> BEES = new DataComponentType<>(listReader(ItemCodecHelper::readBeehiveOccupant), listWriter(ItemCodecHelper::writeBeehiveOccupant), ObjectDataComponent::new); -# + public static final DataComponentType LOCK = new DataComponentType<>(ItemCodecHelper::readLock, ItemCodecHelper::writeLock, ObjectDataComponent::new); -# + public static final DataComponentType CONTAINER_LOOT = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); - addedComponentCount: varint - removedComponentCount: varint - components: SlotComponent[]$addedComponentCount - removeComponents: []$removedComponentCount - type: SlotComponentType - FireworkExplosion: + ItemFireworkExplosion: shape: varint => - - small_ball - - large_ball - - star - - creeper - - burst + - small_ball + - large_ball + - star + - creeper + - burst + # The RGB components of the color, encoded as an integer. colors: i32[]varint + # The RGB components of the color, encoded as an integer. fadeColors: i32[]varint + # Whether the firework has a trail. hasTrail: bool + # Whether the firework has a twinkle effect. hasTwinkle: bool - BookPage: - content: string - filteredContent?: string - - EffectDetail: + ItemEffectDetail: amplifier: varint duration: varint ambient: bool showParticles: bool showIcon: bool - hiddenEffect?: EffectDetail + hiddenEffect?: ItemEffectDetail - BlockSet: - type: varint - name: type ? - if 0: string - default: void - # TODO: This will require a custom type ; we need type - 1 length of blockIds - blockIds: type ? - if 0: void - default: ["arrayWithLengthOffset", {"count": "type", "type": "varint", "lengthOffset": -1}] + ItemPotionEffect: + id: varint + details: ItemEffectDetail - BlockProperty: + ItemBlockProperty: # Name of the block state property. name: string # Whether this is an exact value match, as opposed to ranged. @@ -541,123 +402,144 @@ # Maximum value of the block state property range. Only present in ranged match mode. maxValue?: string - BlockPredicate: - blockSet?: BlockSet[]varint - properties?: BlockProperty[]varint + ItemBlockPredicate: + blockSet?: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "blockIds", type: "varint" } + }] + properties?: ItemBlockProperty[]varint nbt: anonOptionalNbt + ItemBookPage: + # The raw text of the page. TextComponent, max 1024 characters. + content: string + filteredContent?: string + + Slot: + itemCount: i8 + _: itemCount ? + if 0: void + default: + itemId: varint + # https://wiki.vg/Slot_Data#Structured_components + addedComponentCount: varint + removedComponentCount: varint + components: SlotComponent[]$addedComponentCount + removeComponents: []$removedComponentCount + type: SlotComponentType + Particle: # See client/net/minecraft/core/particles/ParticleTypes.java type: varint => - - angry_villager - - block - - block_marker - - bubble - - cloud - - crit - - damage_indicator - - dragon_breath - - dripping_lava - - falling_lava - - landing_lava - - dripping_water - - falling_water - - dust - - dust_color_transition - - effect - - elder_guardian - - enchanted_hit - - enchant - - end_rod - - entity_effect - - explosion_emitter - - explosion - - gust - - small_gust - - gust_emitter_large - - gust_emitter_small - - sonic_boom - - falling_dust - - firework - - fishing - - flame - - infested - - cherry_leaves - - sculk_soul - - sculk_charge - - sculk_charge_pop - - soul_fire_flame - - soul - - flash - - happy_villager - - composter - - heart - - instant_effect - - item - - vibration - - item_slime - - item_cobweb - - item_snowball - - large_smoke - - lava - - mycelium - - note - - poof - - portal - - rain - - smoke - - white_smoke - - sneeze - - spit - - squid_ink - - sweep_attack - - totem_of_undying - - underwater - - splash - - witch - - bubble_pop - - current_down - - bubble_column_up - - nautilus - - dolphin - - campfire_cosy_smoke - - campfire_signal_smoke - - dripping_honey - - falling_honey - - landing_honey - - falling_nectar - - falling_spore_blossom - - ash - - crimson_spore - - warped_spore - - spore_blossom_air - - dripping_obsidian_tear - - falling_obsidian_tear - - landing_obsidian_tear - - reverse_portal - - white_ash - - small_flame - - snowflake - - dripping_dripstone_lava - - falling_dripstone_lava - - dripping_dripstone_water - - falling_dripstone_water - - glow_squid_ink - - glow - - wax_on - - wax_off - - electric_spark - - scrape - - shriek - - egg_crack - - dust_plume - - trial_spawner_detected_player - - trial_spawner_detected_player_ominous - - vault_connection - - dust_pillar - - ominous_spawning - - raid_omen - - trial_omen + - angry_villager + - block + - block_marker + - bubble + - cloud + - crit + - damage_indicator + - dragon_breath + - dripping_lava + - falling_lava + - landing_lava + - dripping_water + - falling_water + - dust + - dust_color_transition + - effect + - elder_guardian + - enchanted_hit + - enchant + - end_rod + - entity_effect + - explosion_emitter + - explosion + - gust + - small_gust + - gust_emitter_large + - gust_emitter_small + - sonic_boom + - falling_dust + - firework + - fishing + - flame + - infested + - cherry_leaves + - sculk_soul + - sculk_charge + - sculk_charge_pop + - soul_fire_flame + - soul + - flash + - happy_villager + - composter + - heart + - instant_effect + - item + - vibration + - item_slime + - item_cobweb + - item_snowball + - large_smoke + - lava + - mycelium + - note + - poof + - portal + - rain + - smoke + - white_smoke + - sneeze + - spit + - squid_ink + - sweep_attack + - totem_of_undying + - underwater + - splash + - witch + - bubble_pop + - current_down + - bubble_column_up + - nautilus + - dolphin + - campfire_cosy_smoke + - campfire_signal_smoke + - dripping_honey + - falling_honey + - landing_honey + - falling_nectar + - falling_spore_blossom + - ash + - crimson_spore + - warped_spore + - spore_blossom_air + - dripping_obsidian_tear + - falling_obsidian_tear + - landing_obsidian_tear + - reverse_portal + - white_ash + - small_flame + - snowflake + - dripping_dripstone_lava + - falling_dripstone_lava + - dripping_dripstone_water + - falling_dripstone_water + - glow_squid_ink + - glow + - wax_on + - wax_off + - electric_spark + - scrape + - shriek + - egg_crack + - dust_plume + - trial_spawner_detected_player + - trial_spawner_detected_player_ominous + - vault_connection + - dust_pillar + - ominous_spawning + - raid_omen + - trial_omen ## ## Tips for reviewing particle data (as of 1.20.5) ## Inside the registry code, each particle can have an associated "options" type and ## each options type can add additional data to be encoded. @@ -692,8 +574,15 @@ if sculk_charge: f32 if shriek: varint if vibration: - position: string - entityId: varint + positionType: varint => + - block + - entity + position: positionType ? + if block: position + if entity: + entityId: varint + entityEyeHeight: f32 + ticks: varint ingredient: Slot[]varint position: [ "bitfield", @@ -803,14 +692,32 @@ if optional_unsigned_int: optvarint if pose: varint if cat_variant: varint - if wolf_variant: varint + if wolf_variant: ["registryEntryHolder", { + "baseName": "variantId", + "otherwise": { name: "variantData", type: "EntityMetadataWolfVariant" } + }] if frog_variant: varint if optional_global_pos: ["option", "string"] - if painting_variant: varint + if painting_variant: ["registryEntryHolder", { + "baseName": "variantId", + "otherwise": { name: "variantData", type: "EntityMetadataPaintingVariant" } + }] if sniffer_state: varint if armadillo_state: varint if vector3: vec3f if quaternion: vec4f + EntityMetadataPaintingVariant: + width: i32 + height: i32 + assetId: string + title?: anonymousNbt + author?: anonymousNbt + EntityMetadataWolfVariant: + wildTexture: string + tameTexture: string + angryTexture: string + biome: IDSet + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint @@ -1184,6 +1091,16 @@ namespace: string id: string version: string + # MC: ClientboundResourcePackPopPacket + packet_common_remove_resource_pack: + uuid?: UUID + # MC: ClientboundResourcePackPushPacket + packet_common_add_resource_pack: + uuid: UUID + url: string + hash: string + forced: bool + promptMessage?: anonymousNbt ^handshaking.toClient.types: packet: @@ -1353,16 +1270,6 @@ entries: []varint key: string value?: anonymousNbt - # MC: ClientboundResourcePackPopPacket - packet_remove_resource_pack: - uuid?: UUID - # MC: ClientboundResourcePackPushPacket - packet_add_resource_pack: - uuid: UUID - url: string - hash: string - forced: bool - promptMessage?: anonymousNbt ## (Store cookie and Transfer are Common) ## # MC: ClientboundUpdateEnabledFeaturesPacket packet_feature_flags: @@ -1399,8 +1306,8 @@ if ping: packet_ping if reset_chat: packet_reset_chat if registry_data: packet_registry_data - if remove_resource_pack: packet_remove_resource_pack - if add_resource_pack: packet_add_resource_pack + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack if store_cookie: packet_common_store_cookie if transfer: packet_common_transfer if feature_flags: packet_feature_flags @@ -1584,21 +1491,21 @@ rootIndex: varint # MC: ClientboundContainerClosePacket packet_close_window: - windowId: u8 + windowId: ContainerID # MC: ClientboundContainerSetContentPacket packet_window_items: - windowId: u8 + windowId: ContainerID stateId: varint items: Slot[]varint carriedItem: Slot # MC: ClientboundContainerSetDataPacket packet_craft_progress_bar: - windowId: u8 + windowId: ContainerID property: i16 value: i16 # MC: ClientboundContainerSetSlotPacket packet_set_slot: - windowId: i8 + windowId: ContainerID stateId: varint slot: i16 item: Slot @@ -1640,6 +1547,26 @@ # MC: ClientboundDisconnectPacket packet_kick_disconnect: reason: anonymousNbt + + ## client\net\minecraft\network\chat\ChatTypeDecoration.java + ## via client\net\minecraft\network\chat\ChatType.java + ChatTypeParameterType: varint => + - content + - sender + - target + ChatType: + translationKey: string + parameters: ChatTypeParameterType[]varint + style: anonymousNbt + ChatTypes: + # Either the extra data is retrieved from the registry (via this ID+1 if non-zero), or it's supplied inline in the chat packet + registryIndex: varint + _: registryIndex ? + if 0: + chat: ChatType + narration: ChatType + default: void + # MC: ClientboundDisguisedChatPacket packet_profileless_chat: message: anonymousNbt @@ -1652,9 +1579,7 @@ entityStatus: i8 # MC: ClientboundExplodePacket packet_explosion: - x: f64 - y: f64 - z: f64 + center: vec3f radius: f32 affectedBlockOffsets: []varint x: i8 @@ -1683,7 +1608,7 @@ gameMode: f32 # MC: ClientboundHorseScreenOpenPacket packet_open_horse_window: - windowId: u8 + windowId: ContainerID nbSlots: varint entityId: i32 # MC: ClientboundHurtAnimationPacket @@ -1797,7 +1722,7 @@ ] # MC: ClientboundMerchantOffersPacket packet_trade_list: - windowId: varint + windowId: ContainerID ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/MerchantOffer.java#L210 trades: []varint inputItem1: @@ -1871,7 +1796,7 @@ id: i64 # MC: ClientboundPlaceGhostRecipePacket packet_craft_recipe_response: - windowId: i8 + windowId: ContainerID recipe: string # MC: ClientboundPlayerAbilitiesPacket packet_abilities: @@ -1897,7 +1822,7 @@ filterTypeMask: filterType ? if 2: i64[]varint default: void - type: varint + type: ChatTypes networkName: anonymousNbt networkTargetName?: anonymousNbt # MC: ClientboundPlayerCombatEndPacket @@ -1915,308 +1840,36 @@ players: UUID[]varint # MC: ClientboundPlayerInfoUpdatePacket packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "anonymousNbt" - ] - if 33: [ - "option", - "anonymousNbt" - ] - if 34: [ - "option", - "anonymousNbt" - ] - if 35: [ - "option", - "anonymousNbt" - ] - if 36: [ - "option", - "anonymousNbt" - ] - if 37: [ - "option", - "anonymousNbt" - ] - if 38: [ - "option", - "anonymousNbt" - ] - if 39: [ - "option", - "anonymousNbt" - ] - if 40: [ - "option", - "anonymousNbt" - ] - if 41: [ - "option", - "anonymousNbt" - ] - if 42: [ - "option", - "anonymousNbt" - ] - if 43: [ - "option", - "anonymousNbt" - ] - if 44: [ - "option", - "anonymousNbt" - ] - if 45: [ - "option", - "anonymousNbt" - ] - if 46: [ - "option", - "anonymousNbt" - ] - if 47: [ - "option", - "anonymousNbt" - ] - if 48: [ - "option", - "anonymousNbt" - ] - if 49: [ - "option", - "anonymousNbt" - ] - if 50: [ - "option", - "anonymousNbt" - ] - if 51: [ - "option", - "anonymousNbt" - ] - if 52: [ - "option", - "anonymousNbt" - ] - if 53: [ - "option", - "anonymousNbt" - ] - if 54: [ - "option", - "anonymousNbt" - ] - if 55: [ - "option", - "anonymousNbt" - ] - if 56: [ - "option", - "anonymousNbt" - ] - if 57: [ - "option", - "anonymousNbt" - ] - if 58: [ - "option", - "anonymousNbt" - ] - if 59: [ - "option", - "anonymousNbt" - ] - if 60: [ - "option", - "anonymousNbt" - ] - if 61: [ - "option", - "anonymousNbt" - ] - if 62: [ - "option", - "anonymousNbt" - ] - if 63: [ - "option", - "anonymousNbt" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void # MC: ClientboundPlayerLookAtPacket packet_face_player: @@ -2231,6 +1884,12 @@ entity_feet_eyes: isEntity ? if true: varint default: void + + # Relative.java + PositionUpdateRelatives: ["bitflags", { + "type": "u32", + "flags": ["x", "y", "z", "yaw", "pitch", "dx", "dy", "dz", "yawDelta"] + }] # MC: ClientboundPlayerPositionPacket packet_position: x: f64 @@ -2238,7 +1897,7 @@ z: f64 yaw: f32 pitch: f32 - flags: i8 + flags: PositionUpdateRelatives teleportId: varint # MC: ClientboundRecipePacket packet_unlock_recipes: @@ -2266,20 +1925,11 @@ packet_reset_score: entity_name: string objective_name?: string - # MC: ClientboundResourcePackPopPacket - packet_remove_resource_pack: - uuid?: UUID - # MC: ClientboundResourcePackPushPacket - packet_add_resource_pack: - uuid: UUID - url: string - hash: string - forced: bool - promptMessage?: anonymousNbt # MC: ClientboundRespawnPacket packet_respawn: worldState: SpawnInfo - copyMetadata: bool + # Bit field: 0b1 - KEEP_ATTRIBUTE_MODIFIERS, 0b10 - KEEP_ENTITY_DATA + copyMetadata: u8 # MC: ClientboundRotateHeadPacket packet_entity_head_rotation: entityId: varint @@ -2923,8 +2573,8 @@ if entity_destroy: packet_entity_destroy if remove_entity_effect: packet_remove_entity_effect if reset_score: packet_reset_score - if remove_resource_pack: packet_remove_resource_pack - if add_resource_pack: packet_add_resource_pack + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack if respawn: packet_respawn if entity_head_rotation: packet_entity_head_rotation if multi_block_change: packet_multi_block_change @@ -3066,7 +2716,7 @@ enchantment: i8 # MC: ServerboundContainerClickPacket packet_window_click: - windowId: u8 + windowId: ContainerID stateId: varint slot: i16 mouseButton: i8 @@ -3077,7 +2727,7 @@ cursorItem: Slot # MC: ServerboundContainerClosePacket packet_close_window: - windowId: u8 + windowId: ContainerID # MC: ServerboundContainerSlotStateChangedPacket packet_set_slot_state: slot_id: varint diff --git a/data/pc/1.20.5/protocol.json b/data/pc/1.20.5/protocol.json index ca20440a5..da8a32b83 100644 --- a/data/pc/1.20.5/protocol.json +++ b/data/pc/1.20.5/protocol.json @@ -21,6 +21,7 @@ "entityMetadataLoop": "native", "topBitSetTerminatedArray": "native", "bitfield": "native", + "bitflags": "native", "container": "native", "switch": "native", "void": "native", @@ -28,7 +29,8 @@ "restBuffer": "native", "anonymousNbt": "native", "anonOptionalNbt": "native", - "arrayWithLengthOffset": "native", + "registryEntryHolder": "native", + "registryEntryHolderSet": "native", "ByteArray": [ "buffer", { @@ -96,6 +98,20 @@ } ] ], + "IDSet": [ + "registryEntryHolderSet", + { + "base": { + "name": "name", + "type": "string" + }, + "otherwise": { + "name": "ids", + "type": "varint" + } + } + ], + "ContainerID": "u8", "SlotComponentType": [ "mapper", { @@ -240,7 +256,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -259,7 +275,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -286,7 +302,7 @@ "type": "varint" }, { - "name": "uniqueId", + "name": "uuid", "type": "UUID" }, { @@ -412,29 +428,21 @@ [ { "name": "blocks", - "type": [ - "array", - { - "countType": "varint", - "type": "BlockSet" - } - ] - }, - { - "name": "hasSpeed", - "type": "bool" + "type": "IDSet" }, { "name": "speed", - "type": "f32" - }, - { - "name": "hasCorrectDropForBlocks", - "type": "bool" + "type": [ + "option", + "f32" + ] }, { "name": "correctDropForBlocks", - "type": "bool" + "type": [ + "option", + "bool" + ] } ] ] @@ -532,21 +540,19 @@ "potion_contents": [ "container", [ - { - "name": "hasPotionId", - "type": "bool" - }, { "name": "potionId", - "type": "optvarint" - }, - { - "name": "hasCustomColor", - "type": "bool" + "type": [ + "option", + "varint" + ] }, { "name": "customColor", - "type": "optvarint" + "type": [ + "option", + "varint" + ] }, { "name": "customEffects", @@ -554,21 +560,13 @@ "array", { "countType": "varint", - "type": [ - "container", - [ - { - "name": "effect", - "type": "varint" - }, - { - "name": "details", - "type": "EffectDetail" - } - ] - ] + "type": "ItemPotionEffect" } ] + }, + { + "name": "customName", + "type": "string" } ] ], @@ -608,7 +606,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] } @@ -642,7 +640,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] }, @@ -818,7 +816,7 @@ }, { "name": "position", - "type": "vec3f" + "type": "position" } ] ] @@ -830,7 +828,7 @@ } ] ], - "firework_explosion": "FireworkExplosion", + "firework_explosion": "ItemFireworkExplosion", "fireworks": [ "container", [ @@ -844,7 +842,7 @@ "array", { "countType": "varint", - "type": "FireworkExplosion" + "type": "ItemFireworkExplosion" } ] } @@ -853,21 +851,19 @@ "profile": [ "container", [ - { - "name": "hasName", - "type": "bool" - }, { "name": "name", - "type": "string" - }, - { - "name": "hasUniqueId", - "type": "bool" + "type": [ + "option", + "string" + ] }, { - "name": "uniqueId", - "type": "UUID" + "name": "uuid", + "type": [ + "option", + "UUID" + ] }, { "name": "properties", @@ -886,13 +882,12 @@ "name": "value", "type": "string" }, - { - "name": "hasSignature", - "type": "bool" - }, { "name": "signature", - "type": "string" + "type": [ + "option", + "string" + ] } ] ] @@ -1050,73 +1045,7 @@ } ] ], - "Slot": [ - "container", - [ - { - "name": "itemCount", - "type": "i8" - }, - { - "anon": true, - "type": [ - "switch", - { - "compareTo": "itemCount", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "itemId", - "type": "varint" - }, - { - "name": "addedComponentCount", - "type": "varint" - }, - { - "name": "removedComponentCount", - "type": "varint" - }, - { - "name": "components", - "type": [ - "array", - { - "count": "addedComponentCount", - "type": "SlotComponent" - } - ] - }, - { - "name": "removeComponents", - "type": [ - "array", - { - "count": "removedComponentCount", - "type": [ - "container", - [ - { - "name": "type", - "type": "SlotComponentType" - } - ] - ] - } - ] - } - ] - ] - } - ] - } - ] - ], - "FireworkExplosion": [ + "ItemFireworkExplosion": [ "container", [ { @@ -1165,23 +1094,7 @@ } ] ], - "BookPage": [ - "container", - [ - { - "name": "content", - "type": "string" - }, - { - "name": "filteredContent", - "type": [ - "option", - "string" - ] - } - ] - ], - "EffectDetail": [ + "ItemEffectDetail": [ "container", [ { @@ -1208,54 +1121,25 @@ "name": "hiddenEffect", "type": [ "option", - "EffectDetail" + "ItemEffectDetail" ] } ] ], - "BlockSet": [ + "ItemPotionEffect": [ "container", [ { - "name": "type", + "name": "id", "type": "varint" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "blockIds", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "0": "void" - }, - "default": [ - "arrayWithLengthOffset", - { - "count": "type", - "type": "varint", - "lengthOffset": -1 - } - ] - } - ] + "name": "details", + "type": "ItemEffectDetail" } ] ], - "BlockProperty": [ + "ItemBlockProperty": [ "container", [ { @@ -1289,7 +1173,7 @@ } ] ], - "BlockPredicate": [ + "ItemBlockPredicate": [ "container", [ { @@ -1297,10 +1181,16 @@ "type": [ "option", [ - "array", + "registryEntryHolderSet", { - "countType": "varint", - "type": "BlockSet" + "base": { + "name": "name", + "type": "string" + }, + "otherwise": { + "name": "blockIds", + "type": "varint" + } } ] ] @@ -1313,7 +1203,7 @@ "array", { "countType": "varint", - "type": "BlockProperty" + "type": "ItemBlockProperty" } ] ] @@ -1324,6 +1214,88 @@ } ] ], + "ItemBookPage": [ + "container", + [ + { + "name": "content", + "type": "string" + }, + { + "name": "filteredContent", + "type": [ + "option", + "string" + ] + } + ] + ], + "Slot": [ + "container", + [ + { + "name": "itemCount", + "type": "i8" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "itemCount", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "item", + "type": "varint" + }, + { + "name": "addedComponentCount", + "type": "varint" + }, + { + "name": "removedComponentCount", + "type": "varint" + }, + { + "name": "components", + "type": [ + "array", + { + "count": "addedComponentCount", + "type": "SlotComponent" + } + ] + }, + { + "name": "removeComponents", + "type": [ + "array", + { + "count": "removedComponentCount", + "type": [ + "container", + [ + { + "name": "type", + "type": "SlotComponentType" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], "Particle": [ "container", [ @@ -1519,12 +1491,46 @@ "vibration": [ "container", [ + { + "name": "positionType", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "block", + "1": "entity" + } + } + ] + }, { "name": "position", - "type": "string" + "type": [ + "switch", + { + "compareTo": "positionType", + "fields": { + "block": "position", + "entity": [ + "container", + [ + { + "name": "entityId", + "type": "varint" + }, + { + "name": "entityEyeHeight", + "type": "f32" + } + ] + ] + } + } + ] }, { - "name": "entityId", + "name": "ticks", "type": "varint" } ] @@ -1752,13 +1758,31 @@ "optional_unsigned_int": "optvarint", "pose": "varint", "cat_variant": "varint", - "wolf_variant": "varint", + "wolf_variant": [ + "registryEntryHolder", + { + "baseName": "variantId", + "otherwise": { + "name": "variantData", + "type": "EntityMetadataWolfVariant" + } + } + ], "frog_variant": "varint", "optional_global_pos": [ "option", "string" ], - "painting_variant": "varint", + "painting_variant": [ + "registryEntryHolder", + { + "baseName": "variantId", + "otherwise": { + "name": "variantData", + "type": "EntityMetadataPaintingVariant" + } + } + ], "sniffer_state": "varint", "armadillo_state": "varint", "vector3": "vec3f", @@ -1769,6 +1793,58 @@ } ] ], + "EntityMetadataPaintingVariant": [ + "container", + [ + { + "name": "width", + "type": "i32" + }, + { + "name": "height", + "type": "i32" + }, + { + "name": "assetId", + "type": "string" + }, + { + "name": "title", + "type": [ + "option", + "anonymousNbt" + ] + }, + { + "name": "author", + "type": [ + "option", + "anonymousNbt" + ] + } + ] + ], + "EntityMetadataWolfVariant": [ + "container", + [ + { + "name": "wildTexture", + "type": "string" + }, + { + "name": "tameTexture", + "type": "string" + }, + { + "name": "angryTexture", + "type": "string" + }, + { + "name": "biome", + "type": "IDSet" + } + ] + ], "entityMetadata": [ "entityMetadataLoop", { @@ -2555,6 +2631,46 @@ ] } ] + ], + "packet_common_remove_resource_pack": [ + "container", + [ + { + "name": "uuid", + "type": [ + "option", + "UUID" + ] + } + ] + ], + "packet_common_add_resource_pack": [ + "container", + [ + { + "name": "uuid", + "type": "UUID" + }, + { + "name": "url", + "type": "string" + }, + { + "name": "hash", + "type": "string" + }, + { + "name": "forced", + "type": "bool" + }, + { + "name": "promptMessage", + "type": [ + "option", + "anonymousNbt" + ] + } + ] ] }, "handshaking": { @@ -3095,46 +3211,6 @@ } ] ], - "packet_remove_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": [ - "option", - "UUID" - ] - } - ] - ], - "packet_add_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "hash", - "type": "string" - }, - { - "name": "forced", - "type": "bool" - }, - { - "name": "promptMessage", - "type": [ - "option", - "anonymousNbt" - ] - } - ] - ], "packet_feature_flags": [ "container", [ @@ -3221,8 +3297,8 @@ "ping": "packet_ping", "reset_chat": "packet_reset_chat", "registry_data": "packet_registry_data", - "remove_resource_pack": "packet_remove_resource_pack", - "add_resource_pack": "packet_add_resource_pack", + "remove_resource_pack": "packet_common_remove_resource_pack", + "add_resource_pack": "packet_common_add_resource_pack", "store_cookie": "packet_common_store_cookie", "transfer": "packet_common_transfer", "feature_flags": "packet_feature_flags", @@ -3853,7 +3929,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" } ] ], @@ -3862,7 +3938,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "stateId", @@ -3889,7 +3965,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "property", @@ -3906,7 +3982,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "stateId", @@ -4050,6 +4126,74 @@ } ] ], + "ChatTypeParameterType": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "content", + "1": "sender", + "2": "target" + } + } + ], + "ChatType": [ + "container", + [ + { + "name": "translationKey", + "type": "string" + }, + { + "name": "parameters", + "type": [ + "array", + { + "countType": "varint", + "type": "ChatTypeParameterType" + } + ] + }, + { + "name": "style", + "type": "anonymousNbt" + } + ] + ], + "ChatTypes": [ + "container", + [ + { + "name": "registryIndex", + "type": "varint" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "registryIndex", + "fields": { + "0": [ + "container", + [ + { + "name": "chat", + "type": "ChatType" + }, + { + "name": "narration", + "type": "ChatType" + } + ] + ] + }, + "default": "void" + } + ] + } + ] + ], "packet_profileless_chat": [ "container", [ @@ -4091,16 +4235,8 @@ "container", [ { - "name": "x", - "type": "f64" - }, - { - "name": "y", - "type": "f64" - }, - { - "name": "z", - "type": "f64" + "name": "center", + "type": "vec3f" }, { "name": "radius", @@ -4224,7 +4360,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "nbSlots", @@ -4732,7 +4868,7 @@ [ { "name": "windowId", - "type": "varint" + "type": "ContainerID" }, { "name": "trades", @@ -5027,7 +5163,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "recipe", @@ -5123,7 +5259,7 @@ }, { "name": "type", - "type": "varint" + "type": "ChatTypes" }, { "name": "networkName", @@ -5184,7 +5320,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -5204,40 +5352,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -5248,40 +5365,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -5292,40 +5378,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -5336,40 +5391,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -5380,40 +5404,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -5424,133 +5417,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "anonymousNbt" - ], - "33": [ - "option", - "anonymousNbt" - ], - "34": [ - "option", - "anonymousNbt" - ], - "35": [ - "option", - "anonymousNbt" - ], - "36": [ - "option", - "anonymousNbt" - ], - "37": [ - "option", - "anonymousNbt" - ], - "38": [ - "option", - "anonymousNbt" - ], - "39": [ - "option", - "anonymousNbt" - ], - "40": [ - "option", - "anonymousNbt" - ], - "41": [ - "option", - "anonymousNbt" - ], - "42": [ - "option", - "anonymousNbt" - ], - "43": [ - "option", - "anonymousNbt" - ], - "44": [ - "option", - "anonymousNbt" - ], - "45": [ - "option", - "anonymousNbt" - ], - "46": [ - "option", - "anonymousNbt" - ], - "47": [ - "option", - "anonymousNbt" - ], - "48": [ - "option", - "anonymousNbt" - ], - "49": [ - "option", - "anonymousNbt" - ], - "50": [ - "option", - "anonymousNbt" - ], - "51": [ - "option", - "anonymousNbt" - ], - "52": [ - "option", - "anonymousNbt" - ], - "53": [ - "option", - "anonymousNbt" - ], - "54": [ - "option", - "anonymousNbt" - ], - "55": [ - "option", - "anonymousNbt" - ], - "56": [ - "option", - "anonymousNbt" - ], - "57": [ - "option", - "anonymousNbt" - ], - "58": [ - "option", - "anonymousNbt" - ], - "59": [ - "option", - "anonymousNbt" - ], - "60": [ - "option", - "anonymousNbt" - ], - "61": [ - "option", - "anonymousNbt" - ], - "62": [ - "option", - "anonymousNbt" - ], - "63": [ + "1": [ "option", "anonymousNbt" ] @@ -5617,6 +5486,23 @@ } ] ], + "PositionUpdateRelatives": [ + "bitflags", + { + "type": "u32", + "flags": [ + "x", + "y", + "z", + "yaw", + "pitch", + "dx", + "dy", + "dz", + "yawDelta" + ] + } + ], "packet_position": [ "container", [ @@ -5642,7 +5528,7 @@ }, { "name": "flags", - "type": "i8" + "type": "PositionUpdateRelatives" }, { "name": "teleportId", @@ -5764,46 +5650,6 @@ } ] ], - "packet_remove_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": [ - "option", - "UUID" - ] - } - ] - ], - "packet_add_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "hash", - "type": "string" - }, - { - "name": "forced", - "type": "bool" - }, - { - "name": "promptMessage", - "type": [ - "option", - "anonymousNbt" - ] - } - ] - ], "packet_respawn": [ "container", [ @@ -5813,7 +5659,7 @@ }, { "name": "copyMetadata", - "type": "bool" + "type": "u8" } ] ], @@ -7543,8 +7389,8 @@ "entity_destroy": "packet_entity_destroy", "remove_entity_effect": "packet_remove_entity_effect", "reset_score": "packet_reset_score", - "remove_resource_pack": "packet_remove_resource_pack", - "add_resource_pack": "packet_add_resource_pack", + "remove_resource_pack": "packet_common_remove_resource_pack", + "add_resource_pack": "packet_common_add_resource_pack", "respawn": "packet_respawn", "entity_head_rotation": "packet_entity_head_rotation", "multi_block_change": "packet_multi_block_change", @@ -7864,7 +7710,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "stateId", @@ -7915,7 +7761,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" } ] ], diff --git a/data/pc/1.20/proto.yml b/data/pc/1.20/proto.yml index 3f83117d1..33f3cd25c 100644 --- a/data/pc/1.20/proto.yml +++ b/data/pc/1.20/proto.yml @@ -1159,308 +1159,36 @@ packet_player_remove: players: UUID[]varint packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "string" - ] - if 33: [ - "option", - "string" - ] - if 34: [ - "option", - "string" - ] - if 35: [ - "option", - "string" - ] - if 36: [ - "option", - "string" - ] - if 37: [ - "option", - "string" - ] - if 38: [ - "option", - "string" - ] - if 39: [ - "option", - "string" - ] - if 40: [ - "option", - "string" - ] - if 41: [ - "option", - "string" - ] - if 42: [ - "option", - "string" - ] - if 43: [ - "option", - "string" - ] - if 44: [ - "option", - "string" - ] - if 45: [ - "option", - "string" - ] - if 46: [ - "option", - "string" - ] - if 47: [ - "option", - "string" - ] - if 48: [ - "option", - "string" - ] - if 49: [ - "option", - "string" - ] - if 50: [ - "option", - "string" - ] - if 51: [ - "option", - "string" - ] - if 52: [ - "option", - "string" - ] - if 53: [ - "option", - "string" - ] - if 54: [ - "option", - "string" - ] - if 55: [ - "option", - "string" - ] - if 56: [ - "option", - "string" - ] - if 57: [ - "option", - "string" - ] - if 58: [ - "option", - "string" - ] - if 59: [ - "option", - "string" - ] - if 60: [ - "option", - "string" - ] - if 61: [ - "option", - "string" - ] - if 62: [ - "option", - "string" - ] - if 63: [ - "option", - "string" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void packet_position: x: f64 diff --git a/data/pc/1.20/protocol.json b/data/pc/1.20/protocol.json index 044c84b28..e56a47325 100644 --- a/data/pc/1.20/protocol.json +++ b/data/pc/1.20/protocol.json @@ -3556,7 +3556,19 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency" + ] + } + ] }, { "name": "data", @@ -3576,40 +3588,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -3620,40 +3601,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -3664,40 +3614,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3708,40 +3627,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -3752,40 +3640,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -3796,135 +3653,11 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "string" - ], - "33": [ - "option", - "string" - ], - "34": [ - "option", - "string" - ], - "35": [ - "option", - "string" - ], - "36": [ - "option", - "string" - ], - "37": [ - "option", - "string" - ], - "38": [ - "option", - "string" - ], - "39": [ - "option", - "string" - ], - "40": [ - "option", - "string" - ], - "41": [ - "option", - "string" - ], - "42": [ - "option", - "string" - ], - "43": [ - "option", - "string" - ], - "44": [ - "option", - "string" - ], - "45": [ - "option", - "string" - ], - "46": [ - "option", - "string" - ], - "47": [ - "option", - "string" - ], - "48": [ - "option", - "string" - ], - "49": [ - "option", - "string" - ], - "50": [ - "option", - "string" - ], - "51": [ - "option", - "string" - ], - "52": [ - "option", - "string" - ], - "53": [ - "option", - "string" - ], - "54": [ - "option", - "string" - ], - "55": [ + "1": [ "option", - "string" - ], - "56": [ - "option", - "string" - ], - "57": [ - "option", - "string" - ], - "58": [ - "option", - "string" - ], - "59": [ - "option", - "string" - ], - "60": [ - "option", - "string" - ], - "61": [ - "option", - "string" - ], - "62": [ - "option", - "string" - ], - "63": [ - "option", - "string" + "anonymousNbt" ] }, "default": "void" diff --git a/data/pc/1.21.1/proto.yml b/data/pc/1.21.1/proto.yml index cd982ac78..5ffbac124 100644 --- a/data/pc/1.21.1/proto.yml +++ b/data/pc/1.21.1/proto.yml @@ -23,6 +23,7 @@ entityMetadataLoop: native topBitSetTerminatedArray: native bitfield: native + bitflags: native container: native switch: native void: native @@ -32,14 +33,8 @@ anonOptionalNbt: native registryEntryHolder: native registryEntryHolderSet: native - arrayWithLengthOffset: native ByteArray: ["buffer", { "countType": "varint" }] - string: [ - "pstring", - { - "countType": "varint" - } - ] + string: ["pstring", { "countType": "varint" }] vec2f: x: f32 y: f32 @@ -60,69 +55,71 @@ "base": { name: "name", type: "string" }, "otherwise": { name: "ids", type: "varint" } }] + ContainerID: u8 SlotComponentType: varint => - - custom_data - - max_stack_size - - max_damage - - damage - - unbreakable - - custom_name - - item_name - - lore - - rarity - - enchantments - - can_place_on - - can_break - - attribute_modifiers - - custom_model_data - - hide_additional_tooltip - - hide_tooltip - - repair_cost - - creative_slot_lock - - enchantment_glint_override - - intangible_projectile - - food - - fire_resistant - - tool - - stored_enchantments - - dyed_color - - map_color - - map_id - - map_decorations - - map_post_processing - - charged_projectiles - - bundle_contents - - potion_contents - - suspicious_stew_effects - - writable_book_content - - written_book_content - - trim - - debug_stick_state - - entity_data - - bucket_entity_data - - block_entity_data - - instrument - - ominous_bottle_amplifier - - jukebox_playable - - recipes - - lodestone_tracker - - firework_explosion - - fireworks - - profile - - note_block_sound - - banner_patterns - - base_color - - pot_decorations - - container - - block_state - - bees - - lock - - container_loot + - custom_data + - max_stack_size + - max_damage + - damage + - unbreakable + - custom_name + - item_name + - lore + - rarity + - enchantments + - can_place_on + - can_break + - attribute_modifiers + - custom_model_data + - hide_additional_tooltip + - hide_tooltip + - repair_cost + - creative_slot_lock + - enchantment_glint_override + - intangible_projectile + - food + - fire_resistant + - tool + - stored_enchantments + - dyed_color + - map_color + - map_id + - map_decorations + - map_post_processing + - charged_projectiles + - bundle_contents + - potion_contents + - suspicious_stew_effects + - writable_book_content + - written_book_content + - trim + - debug_stick_state + - entity_data + - bucket_entity_data + - block_entity_data + - instrument + - ominous_bottle_amplifier + - jukebox_playable + - recipes + - lodestone_tracker + - firework_explosion + - fireworks + - profile + - note_block_sound + - banner_patterns + - base_color + - pot_decorations + - container + - block_state + - bees + - lock + - container_loot SlotComponent: type: SlotComponentType + ## Ref: client/net/minecraft/core/component/DataComponents.java data: type ? - # TODO: look into how nbt works here + ## TODO: look into how nbt works here if custom_data: anonymousNbt if max_stack_size: varint if max_damage: varint @@ -142,12 +139,11 @@ level: varint showTooltip: bool if can_place_on or can_break: - predicates: BlockPredicate[]varint + predicates: ItemBlockPredicate[]varint showTooltip: bool if attribute_modifiers: attributes: []varint typeId: varint - uniqueId: UUID name: string value: f64 operation: varint => @@ -173,18 +169,11 @@ if creative_slot_lock: void if enchantment_glint_override: bool if intangible_projectile: void - # Name Type Description - # Nutrition VarInt Non-negative - # Saturation Modifier Float How much saturation will be given after consuming the item. - # Can Always Eat Boolean Whether the item can always be eaten, even at full hunger. - # Seconds To Eat Float How long it takes to consume the item. - # Using converts to Slot Data This specifies the item produced after consuming the current item. In the Notchian server, this is used for stews, which turn into bowls. Set this to Air if the item should be consumed normally without leaving any other item after. - # Number of effects VarInt Number of elements in the following array. - # Effect Type ID Array Potion Effect The potion effect. See Potion Effect. - # Probability Float The probability for this effect to be chosen. if food: nutrition: varint + # How much saturation will be given after consuming the item. saturationModifier: f32 + # Whether the item can always be eaten, even at full hunger. canAlwaysEat: bool secondsToEat: f32 usingConvertsTo: Slot @@ -192,34 +181,22 @@ effect: varint probability: f32 if fire_resistant: void - # Name Type Description - # Number of Rules VarInt The number of elements in the following array. - # Rule - # Blocks Array Block Set The block this rule applies to. See Block Set. - # Has Speed Boolean - # Speed Optional Float The speed at which the tool breaks this rules' blocks. Only present if Has Speed is true. - # Has Correct Drop For Blocks Boolean - # Correct Drop For Blocks Optional Boolean Whether items should drop only if this is the correct tool. Only present if Has Correct Drop For Blocks is true. - # Default Mining Speed Float The mining speed in case none of the previous rule were matched. - # Damage Per Block VarInt The amount of damage the item takes per block break. if tool: rules: []varint - blocks: BlockSet[]varint - hasSpeed: bool - speed: f32 - hasCorrectDropForBlocks: bool - correctDropForBlocks: bool + blocks: IDSet + # The speed at which the tool breaks this rules' blocks. + speed?: f32 + # Whether items should drop only if this is the correct tool. + correctDropForBlocks?: bool + # The mining speed in case none of the previous rule were matched. defaultMiningSpeed: f32 damagePerBlock: varint - # Name Type Description - # Number of enchantments VarInt Number of elements in the following array. - # Enchantment Type ID Array VarInt Enum The ID of the enchantment in the enchantment registry. - # Level VarInt The level of the enchantment. - # Show In Tooltip Boolean Whether the list of enchantments should be shown on the item's tooltip. if stored_enchantments: enchantments: []varint + # The ID of the enchantment in the enchantment registry. id: varint level: varint + # Whether the list of enchantments should be shown on the item's tooltip. showInTooltip: bool if dyed_color: color: varint @@ -232,53 +209,30 @@ projectiles: Slot[]varint if bundle_contents: contents: Slot[]varint - # Name Type Description - # Has Potion ID Boolean Whether this potion has an ID in the potion registry. If true, it has the default effects associated with the potion type. - # Potion ID Optional VarInt The ID of the potion type in the potion registry. Only present if Has Potion ID is true. - # Has Custom Color Boolean Whether this potion has a custom color. If false, it uses the default color associated with the potion type. - # Custom Color Optional Int The RGB components of the color, encoded as an integer. Only present if Has Custom Color is true. - # Number Of Custom Effects VarInt The number of elements in the following array. - # Custom Effects Array of Potion Effect Any custom effects the potion might have. See Potion Effect. if potion_contents: - hasPotionId: bool - potionId: optvarint - hasCustomColor: bool - customColor: optvarint - customEffects: []varint - effect: varint - details: EffectDetail - # Name Type Description - # Number Of Effects VarInt Number of elements in the following array. - # Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry. - # Duration VarInt The duration of the effect. + # True if this potion has an ID in the potion registry--it has the default effects associated with the potion type. + potionId?: varint + # The RGB components of the color, encoded as an integer. + customColor?: varint + customEffects: ItemPotionEffect[]varint + customName: string if suspicious_stew_effects: effects: []varint + # The ID of the effect in the potion effect type registry. effect: varint + # The duration of the effect. duration: varint - # Name Type Description - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) String (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. if writable_book_content: - pages: BookPage[]varint - # Name Type Description - # Raw Title String (32) The raw title of the book. - # Has Filtered Title Boolean - # Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true. - # Author String - # Generation VarInt - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) TextComponent (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. - # Resolved Boolean Whether entity selectors have already been resolved. + # Max 100 pages + pages: ItemBookPage[]varint if written_book_content: + # The raw title of the book, up to 32 characters. rawTitle: string filteredTitle?: string author: string generation: varint - pages: BookPage[]varint + # Max 100 pages + pages: ItemBookPage[]varint # Whether entity selectors have already been resolved. resolved: bool # Name Type Description @@ -375,53 +329,28 @@ songLocation: string showInTooltip: bool if recipes: anonymousNbt - # Name Type Description - # Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly. - # Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true. - # Position Position The position the compass points to. Only present if Has Global Position is true. - # Tracked Boolean Whether the component is removed when the associated lodestone is broken. if lodestone_tracker: + # Specified if this lodestone points to a position; otherwise it spins randomly. globalPosition?: dimension: string - position: vec3f + # The position the compass points to. Only present if Has Global Position is true. + position: position + # Whether the component is removed when the associated lodestone is broken. tracked: bool - # Name Type Description - # Shape VarInt Enum Can be one of the following: - # 0 - Small ball - # 1 - Large ball - # 2 - Star - # 3 - Creeper - # 4 - Burst - # Number Of Colors VarInt The number of elements in the following array. - # Colors Array of Int The RGB components of the color, encoded as an integer. - # Number Of Fade Colors VarInt The number of elements in the following array. - # Fade Colors Array of Int The RGB components of the color, encoded as an integer. - # Has Trail Boolean - # Has Twinkle Boolean - if firework_explosion: FireworkExplosion + if firework_explosion: ItemFireworkExplosion if fireworks: flightDuration: varint - explosions: FireworkExplosion[]varint - # Name Type Description - # Has Name Boolean - # Name Optional String (16) Only present if Has Name is true. - # Has Unique ID Boolean - # Unique ID Optional UUID Only present if Has Unique ID is true. - # Number of Properties VarInt Number of elements in the following array. - # Property Name Array String (64) - # Value String - # Has Signature Boolean - # Signature String (1024) Only present if Has Signature is true. + explosions: ItemFireworkExplosion[]varint if profile: - hasName: bool - name: string - hasUniqueId: bool - uniqueId: UUID + # If the profile has a name, max 16 characters. + name?: string + uuid?: UUID properties: []varint + # Max 64 characters property: string value: string - hasSignature: bool - signature: string + # Max 1024 characters + signature?: string if note_block_sound: string # Name Type Description # Number of Layers VarInt Number of elements in the following array. @@ -467,110 +396,40 @@ if lock: anonymousNbt if container_loot: anonymousNbt - Slot: - itemCount: i8 - _: itemCount ? - if 0: void - default: - itemId: varint -# https://wiki.vg/Slot_Data#Structured_components -# + public static final DataComponentType CUSTOM_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final IntComponentType MAX_STACK_SIZE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final IntComponentType MAX_DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final IntComponentType DAMAGE = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final BooleanComponentType UNBREAKABLE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new); -# + public static final DataComponentType CUSTOM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new); -# + public static final DataComponentType ITEM_NAME = new DataComponentType<>(ItemCodecHelper::readComponent, ItemCodecHelper::writeComponent, ObjectDataComponent::new); -# + public static final DataComponentType> LORE = new DataComponentType<>(listReader(ItemCodecHelper::readComponent), listWriter(ItemCodecHelper::writeComponent), ObjectDataComponent::new); -# + public static final IntComponentType RARITY = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new); -# + public static final DataComponentType CAN_PLACE_ON = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new); -# + public static final DataComponentType CAN_BREAK = new DataComponentType<>(ItemCodecHelper::readAdventureModePredicate, ItemCodecHelper::writeAdventureModePredicate, ObjectDataComponent::new); -# + public static final DataComponentType ATTRIBUTE_MODIFIERS = new DataComponentType<>(ItemCodecHelper::readItemAttributeModifiers, ItemCodecHelper::writeItemAttributeModifiers, ObjectDataComponent::new); -# + public static final IntComponentType CUSTOM_MODEL_DATA = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType HIDE_ADDITIONAL_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final DataComponentType HIDE_TOOLTIP = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final IntComponentType REPAIR_COST = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType CREATIVE_SLOT_LOCK = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final BooleanComponentType ENCHANTMENT_GLINT_OVERRIDE = new BooleanComponentType(ByteBuf::readBoolean, ByteBuf::writeBoolean, BooleanDataComponent::new); -# + public static final DataComponentType INTANGIBLE_PROJECTILE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType FOOD = new DataComponentType<>(ItemCodecHelper::readFoodProperties, ItemCodecHelper::writeFoodProperties, ObjectDataComponent::new); -# + public static final DataComponentType FIRE_RESISTANT = new DataComponentType<>(unitReader(), unitWriter(), ObjectDataComponent::new); -# + public static final DataComponentType TOOL = new DataComponentType<>(ItemCodecHelper::readToolData, ItemCodecHelper::writeToolData, ObjectDataComponent::new); -# + public static final DataComponentType STORED_ENCHANTMENTS = new DataComponentType<>(ItemCodecHelper::readItemEnchantments, ItemCodecHelper::writeItemEnchantments, ObjectDataComponent::new); -# + public static final DataComponentType DYED_COLOR = new DataComponentType<>(ItemCodecHelper::readDyedItemColor, ItemCodecHelper::writeDyedItemColor, ObjectDataComponent::new); -# + public static final IntComponentType MAP_COLOR = new IntComponentType((helper, input) -> input.readInt(), (helper, output, value) -> output.writeInt(value), IntDataComponent::new); -# + public static final IntComponentType MAP_ID = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType MAP_DECORATIONS = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final IntComponentType MAP_POST_PROCESSING = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType> CHARGED_PROJECTILES = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new); -# + public static final DataComponentType> BUNDLE_CONTENTS = new DataComponentType<>(listReader(ItemCodecHelper::readItemStack), listWriter(ItemCodecHelper::writeItemStack), ObjectDataComponent::new); -# + public static final DataComponentType POTION_CONTENTS = new DataComponentType<>(ItemCodecHelper::readPotionContents, ItemCodecHelper::writePotionContents, ObjectDataComponent::new); -# + public static final DataComponentType> SUSPICIOUS_STEW_EFFECTS = new DataComponentType<>(listReader(ItemCodecHelper::readStewEffect), listWriter(ItemCodecHelper::writeStewEffect), ObjectDataComponent::new); -# + public static final DataComponentType WRITABLE_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWritableBookContent, ItemCodecHelper::writeWritableBookContent, ObjectDataComponent::new); -# + public static final DataComponentType WRITTEN_BOOK_CONTENT = new DataComponentType<>(ItemCodecHelper::readWrittenBookContent, ItemCodecHelper::writeWrittenBookContent, ObjectDataComponent::new); -# + public static final DataComponentType TRIM = new DataComponentType<>(ItemCodecHelper::readArmorTrim, ItemCodecHelper::writeArmorTrim, ObjectDataComponent::new); -# + public static final DataComponentType DEBUG_STICK_STATE = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType BUCKET_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType BLOCK_ENTITY_DATA = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); -# + public static final DataComponentType> INSTRUMENT = new DataComponentType<>(ItemCodecHelper::readInstrument, ItemCodecHelper::writeInstrument, ObjectDataComponent::new); -# + public static final IntComponentType OMINOUS_BOTTLE_AMPLIFIER = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType RECIPES = new DataComponentType<>(ItemCodecHelper::readRecipes, ItemCodecHelper::writeRecipes, ObjectDataComponent::new); -# + public static final DataComponentType LODESTONE_TRACKER = new DataComponentType<>(ItemCodecHelper::readLodestoneTarget, ItemCodecHelper::writeLodestoneTarget, ObjectDataComponent::new); -# + public static final DataComponentType FIREWORK_EXPLOSION = new DataComponentType<>(ItemCodecHelper::readFireworkExplosion, ItemCodecHelper::writeFireworkExplosion, ObjectDataComponent::new); -# + public static final DataComponentType FIREWORKS = new DataComponentType<>(ItemCodecHelper::readFireworks, ItemCodecHelper::writeFireworks, ObjectDataComponent::new); -# + public static final DataComponentType PROFILE = new DataComponentType<>(ItemCodecHelper::readResolvableProfile, ItemCodecHelper::writeResolvableProfile, ObjectDataComponent::new); -# + public static final DataComponentType NOTE_BLOCK_SOUND = new DataComponentType<>(ItemCodecHelper::readResourceLocation, ItemCodecHelper::writeResourceLocation, ObjectDataComponent::new); -# + public static final DataComponentType> BANNER_PATTERNS = new DataComponentType<>(listReader(ItemCodecHelper::readBannerPatternLayer), listWriter(ItemCodecHelper::writeBannerPatternLayer), ObjectDataComponent::new); -# + public static final IntComponentType BASE_COLOR = new IntComponentType(ItemCodecHelper::readVarInt, ItemCodecHelper::writeVarInt, IntDataComponent::new); -# + public static final DataComponentType> POT_DECORATIONS = new DataComponentType<>(listReader(ItemCodecHelper::readVarInt), listWriter(ItemCodecHelper::writeVarInt), ObjectDataComponent::new); -# + public static final DataComponentType> CONTAINER = new DataComponentType<>(listReader(ItemCodecHelper::readOptionalItemStack), listWriter(MinecraftCodecHelper::writeOptionalItemStack), ObjectDataComponent::new); -# + public static final DataComponentType BLOCK_STATE = new DataComponentType<>(ItemCodecHelper::readBlockStateProperties, ItemCodecHelper::writeBlockStateProperties, ObjectDataComponent::new); -# + public static final DataComponentType> BEES = new DataComponentType<>(listReader(ItemCodecHelper::readBeehiveOccupant), listWriter(ItemCodecHelper::writeBeehiveOccupant), ObjectDataComponent::new); -# + public static final DataComponentType LOCK = new DataComponentType<>(ItemCodecHelper::readLock, ItemCodecHelper::writeLock, ObjectDataComponent::new); -# + public static final DataComponentType CONTAINER_LOOT = new DataComponentType<>(ItemCodecHelper::readAnyTag, ItemCodecHelper::writeAnyTag, ObjectDataComponent::new); - addedComponentCount: varint - removedComponentCount: varint - components: SlotComponent[]$addedComponentCount - removeComponents: []$removedComponentCount - type: SlotComponentType + # TODO: see latest todo + ItemSoundEvent: + soundName: string + fixedRange?: f32 - FireworkExplosion: + ItemFireworkExplosion: shape: varint => - - small_ball - - large_ball - - star - - creeper - - burst + - small_ball + - large_ball + - star + - creeper + - burst + # The RGB components of the color, encoded as an integer. colors: i32[]varint + # The RGB components of the color, encoded as an integer. fadeColors: i32[]varint + # Whether the firework has a trail. hasTrail: bool + # Whether the firework has a twinkle effect. hasTwinkle: bool - BookPage: - content: string - filteredContent?: string - - EffectDetail: + ItemEffectDetail: amplifier: varint duration: varint ambient: bool showParticles: bool showIcon: bool - hiddenEffect?: EffectDetail + hiddenEffect?: ItemEffectDetail - BlockSet: - type: varint - name: type ? - if 0: string - default: void - # TODO: This will require a custom type ; we need type - 1 length of blockIds - blockIds: type ? - if 0: void - default: ["arrayWithLengthOffset", {"count": "type", "type": "varint", "lengthOffset": -1}] + ItemPotionEffect: + id: varint + details: ItemEffectDetail - BlockProperty: + ItemBlockProperty: # Name of the block state property. name: string # Whether this is an exact value match, as opposed to ranged. @@ -582,123 +441,144 @@ # Maximum value of the block state property range. Only present in ranged match mode. maxValue?: string - BlockPredicate: - blockSet?: BlockSet[]varint - properties?: BlockProperty[]varint + ItemBlockPredicate: + blockSet?: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "blockIds", type: "varint" } + }] + properties?: ItemBlockProperty[]varint nbt: anonOptionalNbt + ItemBookPage: + # The raw text of the page. TextComponent, max 1024 characters. + content: string + filteredContent?: string + + Slot: + itemCount: varint + _: itemCount ? + if 0: void + default: + itemId: varint + # https://wiki.vg/Slot_Data#Structured_components + addedComponentCount: varint + removedComponentCount: varint + components: SlotComponent[]$addedComponentCount + removeComponents: []$removedComponentCount + type: SlotComponentType + Particle: # See client/net/minecraft/core/particles/ParticleTypes.java type: varint => - - angry_villager - - block - - block_marker - - bubble - - cloud - - crit - - damage_indicator - - dragon_breath - - dripping_lava - - falling_lava - - landing_lava - - dripping_water - - falling_water - - dust - - dust_color_transition - - effect - - elder_guardian - - enchanted_hit - - enchant - - end_rod - - entity_effect - - explosion_emitter - - explosion - - gust - - small_gust - - gust_emitter_large - - gust_emitter_small - - sonic_boom - - falling_dust - - firework - - fishing - - flame - - infested - - cherry_leaves - - sculk_soul - - sculk_charge - - sculk_charge_pop - - soul_fire_flame - - soul - - flash - - happy_villager - - composter - - heart - - instant_effect - - item - - vibration - - item_slime - - item_cobweb - - item_snowball - - large_smoke - - lava - - mycelium - - note - - poof - - portal - - rain - - smoke - - white_smoke - - sneeze - - spit - - squid_ink - - sweep_attack - - totem_of_undying - - underwater - - splash - - witch - - bubble_pop - - current_down - - bubble_column_up - - nautilus - - dolphin - - campfire_cosy_smoke - - campfire_signal_smoke - - dripping_honey - - falling_honey - - landing_honey - - falling_nectar - - falling_spore_blossom - - ash - - crimson_spore - - warped_spore - - spore_blossom_air - - dripping_obsidian_tear - - falling_obsidian_tear - - landing_obsidian_tear - - reverse_portal - - white_ash - - small_flame - - snowflake - - dripping_dripstone_lava - - falling_dripstone_lava - - dripping_dripstone_water - - falling_dripstone_water - - glow_squid_ink - - glow - - wax_on - - wax_off - - electric_spark - - scrape - - shriek - - egg_crack - - dust_plume - - trial_spawner_detected_player - - trial_spawner_detected_player_ominous - - vault_connection - - dust_pillar - - ominous_spawning - - raid_omen - - trial_omen + - angry_villager + - block + - block_marker + - bubble + - cloud + - crit + - damage_indicator + - dragon_breath + - dripping_lava + - falling_lava + - landing_lava + - dripping_water + - falling_water + - dust + - dust_color_transition + - effect + - elder_guardian + - enchanted_hit + - enchant + - end_rod + - entity_effect + - explosion_emitter + - explosion + - gust + - small_gust + - gust_emitter_large + - gust_emitter_small + - sonic_boom + - falling_dust + - firework + - fishing + - flame + - infested + - cherry_leaves + - sculk_soul + - sculk_charge + - sculk_charge_pop + - soul_fire_flame + - soul + - flash + - happy_villager + - composter + - heart + - instant_effect + - item + - vibration + - item_slime + - item_cobweb + - item_snowball + - large_smoke + - lava + - mycelium + - note + - poof + - portal + - rain + - smoke + - white_smoke + - sneeze + - spit + - squid_ink + - sweep_attack + - totem_of_undying + - underwater + - splash + - witch + - bubble_pop + - current_down + - bubble_column_up + - nautilus + - dolphin + - campfire_cosy_smoke + - campfire_signal_smoke + - dripping_honey + - falling_honey + - landing_honey + - falling_nectar + - falling_spore_blossom + - ash + - crimson_spore + - warped_spore + - spore_blossom_air + - dripping_obsidian_tear + - falling_obsidian_tear + - landing_obsidian_tear + - reverse_portal + - white_ash + - small_flame + - snowflake + - dripping_dripstone_lava + - falling_dripstone_lava + - dripping_dripstone_water + - falling_dripstone_water + - glow_squid_ink + - glow + - wax_on + - wax_off + - electric_spark + - scrape + - shriek + - egg_crack + - dust_plume + - trial_spawner_detected_player + - trial_spawner_detected_player_ominous + - vault_connection + - dust_pillar + - ominous_spawning + - raid_omen + - trial_omen ## ## Tips for reviewing particle data (as of 1.20.5) ## Inside the registry code, each particle can have an associated "options" type and ## each options type can add additional data to be encoded. @@ -733,14 +613,14 @@ if sculk_charge: f32 if shriek: varint if vibration: - position_type: varint => + positionType: varint => - block - entity - position: position_type ? + position: positionType ? if block: position if entity: entityId: varint - entity_eye_height: f32 + entityEyeHeight: f32 ticks: varint ingredient: Slot[]varint position: [ @@ -857,19 +737,26 @@ }] if frog_variant: varint if optional_global_pos: ["option", "string"] - if painting_variant: - width: varint - height: varint - assetId: string + if painting_variant: ["registryEntryHolder", { + "baseName": "variantId", + "otherwise": { name: "variantData", type: "EntityMetadataPaintingVariant" } + }] if sniffer_state: varint if armadillo_state: varint if vector3: vec3f if quaternion: vec4f + EntityMetadataPaintingVariant: + width: i32 + height: i32 + assetId: string + title?: anonymousNbt + author?: anonymousNbt EntityMetadataWolfVariant: wildTexture: string tameTexture: string angryTexture: string biome: IDSet + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] minecraft_simple_recipe_format: category: varint @@ -1243,23 +1130,33 @@ namespace: string id: string version: string + # MC: ClientboundResourcePackPopPacket + packet_common_remove_resource_pack: + uuid?: UUID + # MC: ClientboundResourcePackPushPacket + packet_common_add_resource_pack: + uuid: UUID + url: string + hash: string + forced: bool + promptMessage?: anonymousNbt # MC: ClientboundCustomReportDetailsPacket - packet_common_custom_report_details: + packet_common_custom_report_details: # 1.21.1 details: []varint key: string value: string ServerLinkType: varint => - - bug_report - - community_guidelines - - support - - status - - feedback - - community - - website - - forums - - news - - announcements + - bug_report + - community_guidelines + - support + - status + - feedback + - community + - website + - forums + - news + - announcements # MC: ClientboundServerLinksPacket # This packet contains a list of links that the Notchian client will display in the menu # available from the pause menu. Link labels can be built-in or custom (i.e., any text). @@ -1440,16 +1337,6 @@ entries: []varint key: string value?: anonymousNbt - # MC: ClientboundResourcePackPopPacket - packet_remove_resource_pack: - uuid?: UUID - # MC: ClientboundResourcePackPushPacket - packet_add_resource_pack: - uuid: UUID - url: string - hash: string - forced: bool - promptMessage?: anonymousNbt ## (Store cookie and Transfer are Common) ## # MC: ClientboundUpdateEnabledFeaturesPacket packet_feature_flags: @@ -1488,8 +1375,8 @@ if ping: packet_ping if reset_chat: packet_reset_chat if registry_data: packet_registry_data - if remove_resource_pack: packet_remove_resource_pack - if add_resource_pack: packet_add_resource_pack + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack if store_cookie: packet_common_store_cookie if transfer: packet_common_transfer if feature_flags: packet_feature_flags @@ -1550,7 +1437,6 @@ if custom_report_details: packet_common_custom_report_details if server_links: packet_common_server_links ^play.toClient.types: - # World state information for spawn and respawn packets # World state information for spawn and respawn packets SpawnInfo: dimension: varint @@ -1680,21 +1566,21 @@ rootIndex: varint # MC: ClientboundContainerClosePacket packet_close_window: - windowId: u8 + windowId: ContainerID # MC: ClientboundContainerSetContentPacket packet_window_items: - windowId: u8 + windowId: ContainerID stateId: varint items: Slot[]varint carriedItem: Slot # MC: ClientboundContainerSetDataPacket packet_craft_progress_bar: - windowId: u8 + windowId: ContainerID property: i16 value: i16 # MC: ClientboundContainerSetSlotPacket packet_set_slot: - windowId: i8 + windowId: ContainerID stateId: varint slot: i16 item: Slot @@ -1768,9 +1654,7 @@ entityStatus: i8 # MC: ClientboundExplodePacket packet_explosion: - x: f64 - y: f64 - z: f64 + center: vec3f radius: f32 affectedBlockOffsets: []varint x: i8 @@ -1799,7 +1683,7 @@ gameMode: f32 # MC: ClientboundHorseScreenOpenPacket packet_open_horse_window: - windowId: u8 + windowId: ContainerID nbSlots: varint entityId: i32 # MC: ClientboundHurtAnimationPacket @@ -1913,7 +1797,7 @@ ] # MC: ClientboundMerchantOffersPacket packet_trade_list: - windowId: varint + windowId: ContainerID ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/MerchantOffer.java#L210 trades: []varint inputItem1: @@ -1987,7 +1871,7 @@ id: i64 # MC: ClientboundPlaceGhostRecipePacket packet_craft_recipe_response: - windowId: i8 + windowId: ContainerID recipe: string # MC: ClientboundPlayerAbilitiesPacket packet_abilities: @@ -2031,308 +1915,37 @@ players: UUID[]varint # MC: ClientboundPlayerInfoUpdatePacket packet_player_info: - action: i8 + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency", + "update_display_name" + ] + }] data: []varint uuid: UUID - player: ../action ? + player: ../action/add_player ? if 1: game_profile - if 3: game_profile - if 5: game_profile - if 7: game_profile - if 9: game_profile - if 11: game_profile - if 13: game_profile - if 15: game_profile - if 17: game_profile - if 19: game_profile - if 21: game_profile - if 23: game_profile - if 25: game_profile - if 27: game_profile - if 29: game_profile - if 31: game_profile - if 33: game_profile - if 35: game_profile - if 37: game_profile - if 39: game_profile - if 41: game_profile - if 43: game_profile - if 45: game_profile - if 47: game_profile - if 49: game_profile - if 51: game_profile - if 53: game_profile - if 55: game_profile - if 57: game_profile - if 59: game_profile - if 61: game_profile - if 63: game_profile default: void - chatSession: ../action ? - if 2: chat_session - if 3: chat_session - if 6: chat_session - if 7: chat_session - if 10: chat_session - if 11: chat_session - if 14: chat_session - if 15: chat_session - if 18: chat_session - if 19: chat_session - if 22: chat_session - if 23: chat_session - if 26: chat_session - if 27: chat_session - if 30: chat_session - if 31: chat_session - if 34: chat_session - if 35: chat_session - if 38: chat_session - if 39: chat_session - if 42: chat_session - if 43: chat_session - if 46: chat_session - if 47: chat_session - if 50: chat_session - if 51: chat_session - if 54: chat_session - if 55: chat_session - if 58: chat_session - if 59: chat_session - if 62: chat_session - if 63: chat_session + chatSession: ../action/initialize_chat ? + if 1: chat_session default: void - gamemode: ../action ? - if 4: varint - if 5: varint - if 6: varint - if 7: varint - if 12: varint - if 13: varint - if 14: varint - if 15: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 36: varint - if 37: varint - if 38: varint - if 39: varint - if 44: varint - if 45: varint - if 46: varint - if 47: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + gamemode: ../action/update_game_mode ? + if 1: varint default: void - listed: ../action ? - if 8: bool - if 9: bool - if 10: bool - if 11: bool - if 12: bool - if 13: bool - if 14: bool - if 15: bool - if 24: bool - if 25: bool - if 26: bool - if 27: bool - if 28: bool - if 29: bool - if 30: bool - if 31: bool - if 40: bool - if 41: bool - if 42: bool - if 43: bool - if 44: bool - if 45: bool - if 46: bool - if 47: bool - if 56: bool - if 57: bool - if 58: bool - if 59: bool - if 60: bool - if 61: bool - if 62: bool - if 63: bool + listed: ../action/update_listed ? + if 1: varint default: void - latency: ../action ? - if 16: varint - if 17: varint - if 18: varint - if 19: varint - if 20: varint - if 21: varint - if 22: varint - if 23: varint - if 24: varint - if 25: varint - if 26: varint - if 27: varint - if 28: varint - if 29: varint - if 30: varint - if 31: varint - if 48: varint - if 49: varint - if 50: varint - if 51: varint - if 52: varint - if 53: varint - if 54: varint - if 55: varint - if 56: varint - if 57: varint - if 58: varint - if 59: varint - if 60: varint - if 61: varint - if 62: varint - if 63: varint + latency: ../action/update_latency ? + if 1: varint default: void - displayName: ../action ? - if 32: [ - "option", - "anonymousNbt" - ] - if 33: [ - "option", - "anonymousNbt" - ] - if 34: [ - "option", - "anonymousNbt" - ] - if 35: [ - "option", - "anonymousNbt" - ] - if 36: [ - "option", - "anonymousNbt" - ] - if 37: [ - "option", - "anonymousNbt" - ] - if 38: [ - "option", - "anonymousNbt" - ] - if 39: [ - "option", - "anonymousNbt" - ] - if 40: [ - "option", - "anonymousNbt" - ] - if 41: [ - "option", - "anonymousNbt" - ] - if 42: [ - "option", - "anonymousNbt" - ] - if 43: [ - "option", - "anonymousNbt" - ] - if 44: [ - "option", - "anonymousNbt" - ] - if 45: [ - "option", - "anonymousNbt" - ] - if 46: [ - "option", - "anonymousNbt" - ] - if 47: [ - "option", - "anonymousNbt" - ] - if 48: [ - "option", - "anonymousNbt" - ] - if 49: [ - "option", - "anonymousNbt" - ] - if 50: [ - "option", - "anonymousNbt" - ] - if 51: [ - "option", - "anonymousNbt" - ] - if 52: [ - "option", - "anonymousNbt" - ] - if 53: [ - "option", - "anonymousNbt" - ] - if 54: [ - "option", - "anonymousNbt" - ] - if 55: [ - "option", - "anonymousNbt" - ] - if 56: [ - "option", - "anonymousNbt" - ] - if 57: [ - "option", - "anonymousNbt" - ] - if 58: [ - "option", - "anonymousNbt" - ] - if 59: [ - "option", - "anonymousNbt" - ] - if 60: [ - "option", - "anonymousNbt" - ] - if 61: [ - "option", - "anonymousNbt" - ] - if 62: [ - "option", - "anonymousNbt" - ] - if 63: [ - "option", - "anonymousNbt" - ] + displayName: ../action/update_display_name ? + if 1: ["option", "anonymousNbt"] default: void # MC: ClientboundPlayerLookAtPacket packet_face_player: @@ -2347,6 +1960,12 @@ entity_feet_eyes: isEntity ? if true: varint default: void + + # Relative.java + PositionUpdateRelatives: ["bitflags", { + "type": "u32", + "flags": ["x", "y", "z", "yaw", "pitch", "dx", "dy", "dz", "yawDelta"] + }] # MC: ClientboundPlayerPositionPacket packet_position: x: f64 @@ -2354,7 +1973,7 @@ z: f64 yaw: f32 pitch: f32 - flags: i8 + flags: PositionUpdateRelatives teleportId: varint # MC: ClientboundRecipePacket packet_unlock_recipes: @@ -2382,16 +2001,6 @@ packet_reset_score: entity_name: string objective_name?: string - # MC: ClientboundResourcePackPopPacket - packet_remove_resource_pack: - uuid?: UUID - # MC: ClientboundResourcePackPushPacket - packet_add_resource_pack: - uuid: UUID - url: string - hash: string - forced: bool - promptMessage?: anonymousNbt # MC: ClientboundRespawnPacket packet_respawn: worldState: SpawnInfo @@ -3039,8 +2648,8 @@ if entity_destroy: packet_entity_destroy if remove_entity_effect: packet_remove_entity_effect if reset_score: packet_reset_score - if remove_resource_pack: packet_remove_resource_pack - if add_resource_pack: packet_add_resource_pack + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack if respawn: packet_respawn if entity_head_rotation: packet_entity_head_rotation if multi_block_change: packet_multi_block_change @@ -3178,11 +2787,11 @@ # Empty # MC: ServerboundContainerButtonClickPacket packet_enchant_item: - windowId: i8 + windowId: ContainerID enchantment: i8 # MC: ServerboundContainerClickPacket packet_window_click: - windowId: u8 + windowId: ContainerID stateId: varint slot: i16 mouseButton: i8 @@ -3193,7 +2802,7 @@ cursorItem: Slot # MC: ServerboundContainerClosePacket packet_close_window: - windowId: u8 + windowId: ContainerID # MC: ServerboundContainerSlotStateChangedPacket packet_set_slot_state: slot_id: varint @@ -3285,7 +2894,7 @@ id: i64 # MC: ServerboundPlaceRecipePacket packet_craft_recipe_request: - windowId: i8 + windowId: ContainerID recipe: string makeAll: bool # MC: ServerboundPlayerAbilitiesPacket diff --git a/data/pc/1.21.1/protocol.json b/data/pc/1.21.1/protocol.json index cfb740708..ea6b9579d 100644 --- a/data/pc/1.21.1/protocol.json +++ b/data/pc/1.21.1/protocol.json @@ -21,6 +21,7 @@ "entityMetadataLoop": "native", "topBitSetTerminatedArray": "native", "bitfield": "native", + "bitflags": "native", "container": "native", "switch": "native", "void": "native", @@ -30,7 +31,6 @@ "anonOptionalNbt": "native", "registryEntryHolder": "native", "registryEntryHolderSet": "native", - "arrayWithLengthOffset": "native", "ByteArray": [ "buffer", { @@ -124,6 +124,7 @@ } } ], + "ContainerID": "u8", "SlotComponentType": [ "mapper", { @@ -269,7 +270,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -288,7 +289,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -314,10 +315,6 @@ "name": "typeId", "type": "varint" }, - { - "name": "uniqueId", - "type": "UUID" - }, { "name": "name", "type": "string" @@ -441,29 +438,21 @@ [ { "name": "blocks", - "type": [ - "array", - { - "countType": "varint", - "type": "BlockSet" - } - ] - }, - { - "name": "hasSpeed", - "type": "bool" + "type": "IDSet" }, { "name": "speed", - "type": "f32" - }, - { - "name": "hasCorrectDropForBlocks", - "type": "bool" + "type": [ + "option", + "f32" + ] }, { "name": "correctDropForBlocks", - "type": "bool" + "type": [ + "option", + "bool" + ] } ] ] @@ -561,21 +550,19 @@ "potion_contents": [ "container", [ - { - "name": "hasPotionId", - "type": "bool" - }, { "name": "potionId", - "type": "optvarint" - }, - { - "name": "hasCustomColor", - "type": "bool" + "type": [ + "option", + "varint" + ] }, { "name": "customColor", - "type": "optvarint" + "type": [ + "option", + "varint" + ] }, { "name": "customEffects", @@ -583,21 +570,13 @@ "array", { "countType": "varint", - "type": [ - "container", - [ - { - "name": "effect", - "type": "varint" - }, - { - "name": "details", - "type": "EffectDetail" - } - ] - ] + "type": "ItemPotionEffect" } ] + }, + { + "name": "customName", + "type": "string" } ] ], @@ -637,7 +616,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] } @@ -671,7 +650,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] }, @@ -960,7 +939,7 @@ }, { "name": "position", - "type": "vec3f" + "type": "position" } ] ] @@ -972,7 +951,7 @@ } ] ], - "firework_explosion": "FireworkExplosion", + "firework_explosion": "ItemFireworkExplosion", "fireworks": [ "container", [ @@ -986,7 +965,7 @@ "array", { "countType": "varint", - "type": "FireworkExplosion" + "type": "ItemFireworkExplosion" } ] } @@ -995,21 +974,19 @@ "profile": [ "container", [ - { - "name": "hasName", - "type": "bool" - }, { "name": "name", - "type": "string" - }, - { - "name": "hasUniqueId", - "type": "bool" + "type": [ + "option", + "string" + ] }, { - "name": "uniqueId", - "type": "UUID" + "name": "uuid", + "type": [ + "option", + "UUID" + ] }, { "name": "properties", @@ -1028,13 +1005,12 @@ "name": "value", "type": "string" }, - { - "name": "hasSignature", - "type": "bool" - }, { "name": "signature", - "type": "string" + "type": [ + "option", + "string" + ] } ] ] @@ -1192,73 +1168,23 @@ } ] ], - "Slot": [ + "ItemSoundEvent": [ "container", [ { - "name": "itemCount", - "type": "i8" + "name": "soundName", + "type": "string" }, { - "anon": true, + "name": "fixedRange", "type": [ - "switch", - { - "compareTo": "itemCount", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "itemId", - "type": "varint" - }, - { - "name": "addedComponentCount", - "type": "varint" - }, - { - "name": "removedComponentCount", - "type": "varint" - }, - { - "name": "components", - "type": [ - "array", - { - "count": "addedComponentCount", - "type": "SlotComponent" - } - ] - }, - { - "name": "removeComponents", - "type": [ - "array", - { - "count": "removedComponentCount", - "type": [ - "container", - [ - { - "name": "type", - "type": "SlotComponentType" - } - ] - ] - } - ] - } - ] - ] - } + "option", + "f32" ] } ] ], - "FireworkExplosion": [ + "ItemFireworkExplosion": [ "container", [ { @@ -1307,23 +1233,7 @@ } ] ], - "BookPage": [ - "container", - [ - { - "name": "content", - "type": "string" - }, - { - "name": "filteredContent", - "type": [ - "option", - "string" - ] - } - ] - ], - "EffectDetail": [ + "ItemEffectDetail": [ "container", [ { @@ -1350,54 +1260,25 @@ "name": "hiddenEffect", "type": [ "option", - "EffectDetail" + "ItemEffectDetail" ] } ] ], - "BlockSet": [ + "ItemPotionEffect": [ "container", [ { - "name": "type", + "name": "id", "type": "varint" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "blockIds", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "0": "void" - }, - "default": [ - "arrayWithLengthOffset", - { - "count": "type", - "type": "varint", - "lengthOffset": -1 - } - ] - } - ] + "name": "details", + "type": "ItemEffectDetail" } ] ], - "BlockProperty": [ + "ItemBlockProperty": [ "container", [ { @@ -1431,7 +1312,7 @@ } ] ], - "BlockPredicate": [ + "ItemBlockPredicate": [ "container", [ { @@ -1439,10 +1320,16 @@ "type": [ "option", [ - "array", + "registryEntryHolderSet", { - "countType": "varint", - "type": "BlockSet" + "base": { + "name": "name", + "type": "string" + }, + "otherwise": { + "name": "blockIds", + "type": "varint" + } } ] ] @@ -1455,7 +1342,7 @@ "array", { "countType": "varint", - "type": "BlockProperty" + "type": "ItemBlockProperty" } ] ] @@ -1466,6 +1353,88 @@ } ] ], + "ItemBookPage": [ + "container", + [ + { + "name": "content", + "type": "string" + }, + { + "name": "filteredContent", + "type": [ + "option", + "string" + ] + } + ] + ], + "Slot": [ + "container", + [ + { + "name": "itemCount", + "type": "varint" + }, + { + "anon": true, + "type": [ + "switch", + { + "compareTo": "itemCount", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "item", + "type": "varint" + }, + { + "name": "addedComponentCount", + "type": "varint" + }, + { + "name": "removedComponentCount", + "type": "varint" + }, + { + "name": "components", + "type": [ + "array", + { + "count": "addedComponentCount", + "type": "SlotComponent" + } + ] + }, + { + "name": "removeComponents", + "type": [ + "array", + { + "count": "removedComponentCount", + "type": [ + "container", + [ + { + "name": "type", + "type": "SlotComponentType" + } + ] + ] + } + ] + } + ] + ] + } + ] + } + ] + ], "Particle": [ "container", [ @@ -1662,7 +1631,7 @@ "container", [ { - "name": "position_type", + "name": "positionType", "type": [ "mapper", { @@ -1679,7 +1648,7 @@ "type": [ "switch", { - "compareTo": "position_type", + "compareTo": "positionType", "fields": { "block": "position", "entity": [ @@ -1690,7 +1659,7 @@ "type": "varint" }, { - "name": "entity_eye_height", + "name": "entityEyeHeight", "type": "f32" } ] @@ -1944,21 +1913,14 @@ "string" ], "painting_variant": [ - "container", - [ - { - "name": "width", - "type": "varint" - }, - { - "name": "height", - "type": "varint" - }, - { - "name": "assetId", - "type": "string" + "registryEntryHolder", + { + "baseName": "variantId", + "otherwise": { + "name": "variantData", + "type": "EntityMetadataPaintingVariant" } - ] + } ], "sniffer_state": "varint", "armadillo_state": "varint", @@ -1970,6 +1932,37 @@ } ] ], + "EntityMetadataPaintingVariant": [ + "container", + [ + { + "name": "width", + "type": "i32" + }, + { + "name": "height", + "type": "i32" + }, + { + "name": "assetId", + "type": "string" + }, + { + "name": "title", + "type": [ + "option", + "anonymousNbt" + ] + }, + { + "name": "author", + "type": [ + "option", + "anonymousNbt" + ] + } + ] + ], "EntityMetadataWolfVariant": [ "container", [ @@ -2778,6 +2771,46 @@ } ] ], + "packet_common_remove_resource_pack": [ + "container", + [ + { + "name": "uuid", + "type": [ + "option", + "UUID" + ] + } + ] + ], + "packet_common_add_resource_pack": [ + "container", + [ + { + "name": "uuid", + "type": "UUID" + }, + { + "name": "url", + "type": "string" + }, + { + "name": "hash", + "type": "string" + }, + { + "name": "forced", + "type": "bool" + }, + { + "name": "promptMessage", + "type": [ + "option", + "anonymousNbt" + ] + } + ] + ], "packet_common_custom_report_details": [ "container", [ @@ -3413,46 +3446,6 @@ } ] ], - "packet_remove_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": [ - "option", - "UUID" - ] - } - ] - ], - "packet_add_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "hash", - "type": "string" - }, - { - "name": "forced", - "type": "bool" - }, - { - "name": "promptMessage", - "type": [ - "option", - "anonymousNbt" - ] - } - ] - ], "packet_feature_flags": [ "container", [ @@ -3541,8 +3534,8 @@ "ping": "packet_ping", "reset_chat": "packet_reset_chat", "registry_data": "packet_registry_data", - "remove_resource_pack": "packet_remove_resource_pack", - "add_resource_pack": "packet_add_resource_pack", + "remove_resource_pack": "packet_common_remove_resource_pack", + "add_resource_pack": "packet_common_add_resource_pack", "store_cookie": "packet_common_store_cookie", "transfer": "packet_common_transfer", "feature_flags": "packet_feature_flags", @@ -4179,7 +4172,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" } ] ], @@ -4188,7 +4181,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "stateId", @@ -4215,7 +4208,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "property", @@ -4232,7 +4225,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "stateId", @@ -4485,16 +4478,8 @@ "container", [ { - "name": "x", - "type": "f64" - }, - { - "name": "y", - "type": "f64" - }, - { - "name": "z", - "type": "f64" + "name": "center", + "type": "vec3f" }, { "name": "radius", @@ -4618,7 +4603,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "nbSlots", @@ -5126,7 +5111,7 @@ [ { "name": "windowId", - "type": "varint" + "type": "ContainerID" }, { "name": "trades", @@ -5421,7 +5406,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "recipe", @@ -5578,7 +5563,20 @@ [ { "name": "action", - "type": "i8" + "type": [ + "bitflags", + { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency", + "update_display_name" + ] + } + ] }, { "name": "data", @@ -5598,40 +5596,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/add_player", "fields": { - "1": "game_profile", - "3": "game_profile", - "5": "game_profile", - "7": "game_profile", - "9": "game_profile", - "11": "game_profile", - "13": "game_profile", - "15": "game_profile", - "17": "game_profile", - "19": "game_profile", - "21": "game_profile", - "23": "game_profile", - "25": "game_profile", - "27": "game_profile", - "29": "game_profile", - "31": "game_profile", - "33": "game_profile", - "35": "game_profile", - "37": "game_profile", - "39": "game_profile", - "41": "game_profile", - "43": "game_profile", - "45": "game_profile", - "47": "game_profile", - "49": "game_profile", - "51": "game_profile", - "53": "game_profile", - "55": "game_profile", - "57": "game_profile", - "59": "game_profile", - "61": "game_profile", - "63": "game_profile" + "1": "game_profile" }, "default": "void" } @@ -5642,40 +5609,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/initialize_chat", "fields": { - "2": "chat_session", - "3": "chat_session", - "6": "chat_session", - "7": "chat_session", - "10": "chat_session", - "11": "chat_session", - "14": "chat_session", - "15": "chat_session", - "18": "chat_session", - "19": "chat_session", - "22": "chat_session", - "23": "chat_session", - "26": "chat_session", - "27": "chat_session", - "30": "chat_session", - "31": "chat_session", - "34": "chat_session", - "35": "chat_session", - "38": "chat_session", - "39": "chat_session", - "42": "chat_session", - "43": "chat_session", - "46": "chat_session", - "47": "chat_session", - "50": "chat_session", - "51": "chat_session", - "54": "chat_session", - "55": "chat_session", - "58": "chat_session", - "59": "chat_session", - "62": "chat_session", - "63": "chat_session" + "1": "chat_session" }, "default": "void" } @@ -5686,40 +5622,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_game_mode", "fields": { - "4": "varint", - "5": "varint", - "6": "varint", - "7": "varint", - "12": "varint", - "13": "varint", - "14": "varint", - "15": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "36": "varint", - "37": "varint", - "38": "varint", - "39": "varint", - "44": "varint", - "45": "varint", - "46": "varint", - "47": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -5730,40 +5635,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_listed", "fields": { - "8": "bool", - "9": "bool", - "10": "bool", - "11": "bool", - "12": "bool", - "13": "bool", - "14": "bool", - "15": "bool", - "24": "bool", - "25": "bool", - "26": "bool", - "27": "bool", - "28": "bool", - "29": "bool", - "30": "bool", - "31": "bool", - "40": "bool", - "41": "bool", - "42": "bool", - "43": "bool", - "44": "bool", - "45": "bool", - "46": "bool", - "47": "bool", - "56": "bool", - "57": "bool", - "58": "bool", - "59": "bool", - "60": "bool", - "61": "bool", - "62": "bool", - "63": "bool" + "1": "varint" }, "default": "void" } @@ -5774,40 +5648,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_latency", "fields": { - "16": "varint", - "17": "varint", - "18": "varint", - "19": "varint", - "20": "varint", - "21": "varint", - "22": "varint", - "23": "varint", - "24": "varint", - "25": "varint", - "26": "varint", - "27": "varint", - "28": "varint", - "29": "varint", - "30": "varint", - "31": "varint", - "48": "varint", - "49": "varint", - "50": "varint", - "51": "varint", - "52": "varint", - "53": "varint", - "54": "varint", - "55": "varint", - "56": "varint", - "57": "varint", - "58": "varint", - "59": "varint", - "60": "varint", - "61": "varint", - "62": "varint", - "63": "varint" + "1": "varint" }, "default": "void" } @@ -5818,133 +5661,9 @@ "type": [ "switch", { - "compareTo": "../action", + "compareTo": "../action/update_display_name", "fields": { - "32": [ - "option", - "anonymousNbt" - ], - "33": [ - "option", - "anonymousNbt" - ], - "34": [ - "option", - "anonymousNbt" - ], - "35": [ - "option", - "anonymousNbt" - ], - "36": [ - "option", - "anonymousNbt" - ], - "37": [ - "option", - "anonymousNbt" - ], - "38": [ - "option", - "anonymousNbt" - ], - "39": [ - "option", - "anonymousNbt" - ], - "40": [ - "option", - "anonymousNbt" - ], - "41": [ - "option", - "anonymousNbt" - ], - "42": [ - "option", - "anonymousNbt" - ], - "43": [ - "option", - "anonymousNbt" - ], - "44": [ - "option", - "anonymousNbt" - ], - "45": [ - "option", - "anonymousNbt" - ], - "46": [ - "option", - "anonymousNbt" - ], - "47": [ - "option", - "anonymousNbt" - ], - "48": [ - "option", - "anonymousNbt" - ], - "49": [ - "option", - "anonymousNbt" - ], - "50": [ - "option", - "anonymousNbt" - ], - "51": [ - "option", - "anonymousNbt" - ], - "52": [ - "option", - "anonymousNbt" - ], - "53": [ - "option", - "anonymousNbt" - ], - "54": [ - "option", - "anonymousNbt" - ], - "55": [ - "option", - "anonymousNbt" - ], - "56": [ - "option", - "anonymousNbt" - ], - "57": [ - "option", - "anonymousNbt" - ], - "58": [ - "option", - "anonymousNbt" - ], - "59": [ - "option", - "anonymousNbt" - ], - "60": [ - "option", - "anonymousNbt" - ], - "61": [ - "option", - "anonymousNbt" - ], - "62": [ - "option", - "anonymousNbt" - ], - "63": [ + "1": [ "option", "anonymousNbt" ] @@ -6011,6 +5730,23 @@ } ] ], + "PositionUpdateRelatives": [ + "bitflags", + { + "type": "u32", + "flags": [ + "x", + "y", + "z", + "yaw", + "pitch", + "dx", + "dy", + "dz", + "yawDelta" + ] + } + ], "packet_position": [ "container", [ @@ -6036,7 +5772,7 @@ }, { "name": "flags", - "type": "i8" + "type": "PositionUpdateRelatives" }, { "name": "teleportId", @@ -6158,46 +5894,6 @@ } ] ], - "packet_remove_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": [ - "option", - "UUID" - ] - } - ] - ], - "packet_add_resource_pack": [ - "container", - [ - { - "name": "uuid", - "type": "UUID" - }, - { - "name": "url", - "type": "string" - }, - { - "name": "hash", - "type": "string" - }, - { - "name": "forced", - "type": "bool" - }, - { - "name": "promptMessage", - "type": [ - "option", - "anonymousNbt" - ] - } - ] - ], "packet_respawn": [ "container", [ @@ -7934,8 +7630,8 @@ "entity_destroy": "packet_entity_destroy", "remove_entity_effect": "packet_remove_entity_effect", "reset_score": "packet_reset_score", - "remove_resource_pack": "packet_remove_resource_pack", - "add_resource_pack": "packet_add_resource_pack", + "remove_resource_pack": "packet_common_remove_resource_pack", + "add_resource_pack": "packet_common_add_resource_pack", "respawn": "packet_respawn", "entity_head_rotation": "packet_entity_head_rotation", "multi_block_change": "packet_multi_block_change", @@ -8242,7 +7938,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "enchantment", @@ -8255,7 +7951,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" }, { "name": "stateId", @@ -8306,7 +8002,7 @@ [ { "name": "windowId", - "type": "u8" + "type": "ContainerID" } ] ], @@ -8630,7 +8326,7 @@ [ { "name": "windowId", - "type": "i8" + "type": "ContainerID" }, { "name": "recipe", diff --git a/data/pc/1.21.3/proto.yml b/data/pc/1.21.3/proto.yml index db8572b02..b39848049 100644 --- a/data/pc/1.21.3/proto.yml +++ b/data/pc/1.21.3/proto.yml @@ -1,3368 +1,3320 @@ -!version: 1.21.3 -!StartDocs: true - -^types: - varint: native - varlong: native - optvarint: varint - pstring: native - buffer: native - u8: native - u16: native - u32: native - u64: native - i8: native - i16: native - i32: native - i64: native - bool: native - f32: native - f64: native - UUID: native - option: native - entityMetadataLoop: native - topBitSetTerminatedArray: native - bitfield: native - bitflags: native - container: native - switch: native - void: native - array: native - restBuffer: native - anonymousNbt: native - anonOptionalNbt: native - registryEntryHolder: native - registryEntryHolderSet: native - ByteArray: ["buffer", { "countType": "varint" }] - string: [ - "pstring", - { - "countType": "varint" - } - ] - vec2f: - x: f32 - y: f32 - vec3f: - x: f32 - y: f32 - z: f32 - vec4f: - x: f32 - y: f32 - z: f32 - w: f32 - vec3f64: - x: f64 - y: f64 - z: f64 - IDSet: ["registryEntryHolderSet", { - "base": { name: "name", type: "string" }, - "otherwise": { name: "ids", type: "varint" } - }] - ContainerID: varint - SoundEvent: - soundName: string - fixedRange?: f32 - RecipeDisplay: - type: varint => - - crafting_shapeless - - crafting_shaped - - furnace - - stonecutter - - smithing - data: type ? - if crafting_shapeless: - ingredients: SlotDisplay[]varint - result: SlotDisplay - craftingStation: SlotDisplay - if crafting_shaped: - width: varint - height: varint - ingredients: SlotDisplay[]varint - result: SlotDisplay - craftingStation: SlotDisplay - if furnace: - ingredient: SlotDisplay - fuel: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - duration: varint - experience: f32 - if stonecutter: - ingredient: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - if smithing: - template: SlotDisplay - base: SlotDisplay - addition: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - SlotDisplay: - type: varint => - - empty - - any_fuel - - item - - item_stack - - tag - - smithing_trim - - with_remainder - - composite - data: type ? - if empty or any_fuel: void - if item: varint - if item_stack: Slot - if tag: string - if simthing_trim: - base: SlotDisplay - material: SlotDisplay - pattern: SlotDisplay - if with_remainder: - input: SlotDisplay - remainder: SlotDisplay - if composite: SlotDisplay[]varint - SlotComponentType: varint => - - custom_data - - max_stack_size - - max_damage - - damage - - unbreakable - - custom_name - - item_name - - item_model - - lore - - rarity - - enchantments - - can_place_on - - can_break - - attribute_modifiers - - custom_model_data - - hide_additional_tooltip - - hide_tooltip - - repair_cost - - creative_slot_lock - - enchantment_glint_override - - intangible_projectile - - food - - consumable - - use_remainder - - use_cooldown - - damage_resistant - - tool - - enchantable - - equippable - - repairable - - glider - - tooltip_style - - death_protection - - stored_enchantments - - dyed_color - - map_color - - map_id - - map_decorations - - map_post_processing - - charged_projectiles - - bundle_contents - - potion_contents - - suspicious_stew_effects - - writable_book_content - - written_book_content - - trim - - debug_stick_state - - entity_data - - bucket_entity_data - - block_entity_data - - instrument - - ominous_bottle_amplifier - - jukebox_playable - - recipes - - lodestone_tracker - - firework_explosion - - fireworks - - profile - - note_block_sound - - banner_patterns - - base_color - - pot_decorations - - container - - block_state - - bees - - lock - - container_loot - - SlotComponent: - type: SlotComponentType - ## Ref: client/net/minecraft/core/component/DataComponents.java - data: type ? - ## TODO: look into how nbt works here - if custom_data: anonymousNbt - if max_stack_size: varint - if max_damage: varint - if damage: varint - if unbreakable: bool - if custom_name: anonymousNbt - if item_name: anonymousNbt - if item_model: string - if lore: anonOptionalNbt[]varint - if rarity: varint => - - common - - uncommon - - rare - - epic - if enchantments: - enchantments: []varint - id: varint - level: varint - showTooltip: bool - if can_place_on or can_break: - predicates: BlockPredicate[]varint - showTooltip: bool - if attribute_modifiers: - attributes: []varint - typeId: varint - name: string - value: f64 - operation: varint => - - add - - multiply_base - - multiply_total - slot: varint => - - any - - main_hand - - off_hand - - hand - - feet - - legs - - chest - - head - - armor - - body - showTooltip: bool - if custom_model_data: varint - if hide_additional_tooltip: void - if hide_tooltip: void - if repair_cost: varint - if creative_slot_lock: void - if enchantment_glint_override: bool - if intangible_projectile: void - if food: - nutrition: varint - # How much saturation will be given after consuming the item. - saturationModifier: f32 - # Whether the item can always be eaten, even at full hunger. - canAlwaysEat: bool - if consumable: - consume_seconds: f32 - animation: varint => - - none - - eat - - drink - - block - - bow - - spear - - crossbow - - spyglass - - toot_horn - - brush - sound: ["registryEntryHolder", { - "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } - }] - makes_particles: bool - effects: ConsumeEffect[]varint - if use_remainder: Slot - if use_cooldown: - seconds: f32 - cooldownGroup?: string - if damage_resistant: string - if tool: - rules: []varint - blocks: IDSet - # The speed at which the tool breaks this rules' blocks. - speed?: f32 - # Whether items should drop only if this is the correct tool. - correctDropForBlocks?: bool - # The mining speed in case none of the previous rule were matched. - defaultMiningSpeed: f32 - damagePerBlock: varint - # Enchantment cost up to which the item can be enchanted - if enchantable: varint - if equippable: - slot: varint => - - main_hand - - off_hand - - feet - - legs - - chest - - head - - body - sound: ["registryEntryHolder", { - "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } - }] - model?: string - cameraOverlay?: string - allowedEntities?: IDSet - dispensable: bool - swappable: bool - damageable: bool - if repairable: - items: IDSet - if tooltip_style: string - if death_protection: - effects: ConsumeEffect[]varint - if stored_enchantments: - enchantments: []varint - # The ID of the enchantment in the enchantment registry. - id: varint - level: varint - # Whether the list of enchantments should be shown on the item's tooltip. - showInTooltip: bool - if dyed_color: - color: varint - showTooltip: bool - if map_color: varint - if map_id: varint - if map_decorations: anonOptionalNbt - if map_post_processing: varint - if charged_projectiles: - projectiles: Slot[]varint - if bundle_contents: - contents: Slot[]varint - if potion_contents: - # True if this potion has an ID in the potion registry--it has the default effects associated with the potion type. - potionId?: varint - # The RGB components of the color, encoded as an integer. - customColor?: varint - customEffects: PotionEffect[]varint - customName: string - # Name Type Description - # Number Of Effects VarInt Number of elements in the following array. - # Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry. - # Duration VarInt The duration of the effect. - if suspicious_stew_effects: - effects: []varint - effect: varint - duration: varint - # Name Type Description - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) String (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. - if writable_book_content: - pages: BookPage[]varint - # Name Type Description - # Raw Title String (32) The raw title of the book. - # Has Filtered Title Boolean - # Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true. - # Author String - # Generation VarInt - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) TextComponent (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. - # Resolved Boolean Whether entity selectors have already been resolved. - if written_book_content: - rawTitle: string - filteredTitle?: string - author: string - generation: varint - pages: BookPage[]varint - # Whether entity selectors have already been resolved. - resolved: bool - # Name Type Description - # Trim Material Type VarInt Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents a trim material, with the necessary data following. - # Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1. - # Asset Name Optional String See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Ingredient Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Item Model Index Optional Float See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Number of Overrides Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Override Armor Material Type Optional Array VarInt Enum See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Overriden Asset Name String See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Description Optional Text Component See Armor Trim Material Registry. Only present if Trim Material Type is 0. - # Trim Pattern Type VarInt Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents a trim pattern, with the necessary data following. - # Anything else - References a trim pattern in its registry, by the ID of Trim Pattern Type - 1. - # Asset Name Optional String See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. - # Template Item Optional VarInt See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. - # Description Optional Text Component See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. - # Decal Optional Boolean See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. - # Show In Tooltip Boolean Whether the trim information should be shown on the item's tooltip. - if trim: - # Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents a trim material, with the necessary data following. - # Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1. - materialType: varint - _: materialType ? - if 0: - assetName: string - ingredientId: varint - itemModelIndex: f32 - numberOfOverrides: optvarint - override: []varint - armorMaterialType: varint - overridenAssetName: string - description: string - trimPatternType: varint - _: trimPatternType ? - if 0: - assetName: string - templateItem: varint - description: string - decal: bool - showInTooltip: bool - if debug_stick_state: anonymousNbt - if entity_data: anonymousNbt - if bucket_entity_data: anonymousNbt - if block_entity_data: anonymousNbt - # Name Type Description - # Instrument Type VarInt Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents an instrument, with the necessary data following. - # Anything else - References an instrument in its registry, by the ID of Instrument Type - 1. - # Sound Event Optional Sound Event The sound to be played. Only present if Instrument Type is 0. - # Use duration Optional Float The maximum range of the sound. Only present if Instrument Type is 0. - # Range Optional Float The range of the instrument. Only present if Instrument Type is 0. - if instrument: - instrumentType: varint - _: instrumentType ? - if 0: - soundEvent: string - useDuration: f32 - range: f32 - if ominous_bottle_amplifier: varint - # Name Type Description - # Direct Mode Boolean Whether the jukebox song is specified directly, or just referenced by name. - # Jukebox Song Name Optional Identifier The name of the jukebox song in its respective registry. Only present if Direct Mode is false. - # Jukebox Song Type Optional VarInt Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents a jukebox song, with the necessary data following. - # Anything else - References a jukebox song in its registry, by the ID of Jukebox Song Type - 1. - # Only present if Direct Mode is true. - # Sound Event Optional Sound Event The sound to be played. Only present if Direct Mode is true and Jukebox Song Type is 0. - # Description Optional Text Component The description shown in the item lore. Only present if Direct Mode is true and Jukebox Song Type is 0. - # Duration Optional Float The duration the songs should play for, in seconds. Only present if Direct Mode is true and Jukebox Song Type is 0. - # Output Optional VarInt The output strength given by a comparator. Between 0 and 15. Only present if Direct Mode is true and Jukebox Song Type is 0. - # Show In Tooltip Boolean Whether the song should be shown on the item's tooltip. - if jukebox_playable: - directMode: bool - _: directMode ? - if true: - jukeboxSongName: string - jukeboxSongType: varint - _: jukeboxSongType ? - if 0: - soundEvent: - soundEventType: varint - _: soundEventType ? - if 0: - soundName: string - fixedRange?: f32 - description: anonymousNbt - duration: f32 - output: varint - if false: - songLocation: string - showInTooltip: bool - if recipes: anonymousNbt - # Name Type Description - # Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly. - # Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true. - # Position Position The position the compass points to. Only present if Has Global Position is true. - # Tracked Boolean Whether the component is removed when the associated lodestone is broken. - if lodestone_tracker: - globalPosition?: - dimension: string - position: position - tracked: bool - # Name Type Description - # Shape VarInt Enum Can be one of the following: - # 0 - Small ball - # 1 - Large ball - # 2 - Star - # 3 - Creeper - # 4 - Burst - # Number Of Colors VarInt The number of elements in the following array. - # Colors Array of Int The RGB components of the color, encoded as an integer. - # Number Of Fade Colors VarInt The number of elements in the following array. - # Fade Colors Array of Int The RGB components of the color, encoded as an integer. - # Has Trail Boolean - # Has Twinkle Boolean - if firework_explosion: FireworkExplosion - if fireworks: - flightDuration: varint - explosions: FireworkExplosion[]varint - # Name Type Description - # Has Name Boolean - # Name Optional String (16) Only present if Has Name is true. - # Has Unique ID Boolean - # Unique ID Optional UUID Only present if Has Unique ID is true. - # Number of Properties VarInt Number of elements in the following array. - # Property Name Array String (64) - # Value String - # Has Signature Boolean - # Signature String (1024) Only present if Has Signature is true. - if profile: - hasName: bool - name: string - hasUniqueId: bool - uniqueId: UUID - properties: []varint - property: string - value: string - hasSignature: bool - signature: string - if note_block_sound: string - # Name Type Description - # Number of Layers VarInt Number of elements in the following array. - # Layer Pattern Type Array VarInt Identifier used to determine the data that follows. It can be either: - # 0 - Directly represents a pattern, with the necessary data following. - # Anything else - References a pattern in its registry, by the ID of Pattern Type - 1. - # Asset ID Optional Identifier Identifier of the asset. Only present if Pattern Type is 0. - # Translation Key Optional String Only present if Pattern Type is 0. - # Color Dye Color See Dye Color. - if banner_patterns: - layers: []varint - patternType: varint - _: patternType ? - if 0: - assetId: string - translationKey: string - color: varint - if base_color: varint - if pot_decorations: - # The ID of the items in the item registry. - decorations: varint[]varint - if container: - contents: Slot[]varint - # Name Type Description - # Number of Properties VarInt Number of elements in the following array. - # Property Name Array String - # Value String - if block_state: - properties: []varint - property: string - value: string - # Name Type Description - # Number of Bees VarInt Number of elements in the following array. - # Bee Entity Data Array NBT - # Ticks In Hive VarInt - # Min Ticks In Hive VarInt - if bees: - bees: []varint - # Custom data for the entity, always a Compound Tag. Same structure as the minecraft:custom_data component. - nbtData: anonymousNbt - ticksInHive: varint - minTicksInHive: varint - if lock: anonymousNbt - if container_loot: anonymousNbt - - Slot: - itemCount: varint - _: itemCount ? - if 0: void - default: - itemId: varint -# https://wiki.vg/Slot_Data#Structured_components - addedComponentCount: varint - removedComponentCount: varint - components: SlotComponent[]$addedComponentCount - removeComponents: []$removedComponentCount - type: SlotComponentType - - FireworkExplosion: - shape: varint => - - small_ball - - large_ball - - star - - creeper - - burst - colors: i32[]varint - fadeColors: i32[]varint - hasTrail: bool - hasTwinkle: bool - - BookPage: - content: string - filteredContent?: string - - EffectDetail: - amplifier: varint - duration: varint - ambient: bool - showParticles: bool - showIcon: bool - hiddenEffect?: EffectDetail - - PotionEffect: - id: varint - details: EffectDetail - - ConsumeEffect: - type: varint => - - apply_effects - - remove_effects - - clear_all_effects - - teleport_randomly - - play_sound - _: type ? - if apply_effects: - effects: PotionEffect[]varint - probability: f32 - if remove_effects: - effects: IDSet - if clear_all_effects: void - if teleport_randomly: - diameter: f32 - if play_sound: - sound: ["registryEntryHolder", { - "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } - }] - - BlockProperty: - # Name of the block state property. - name: string - # Whether this is an exact value match, as opposed to ranged. - isExactMatch: bool - # Value of the block state property. Only present in exact match mode. - exactValue?: string - # Minimum value of the block state property range. Only present in ranged match mode. - minValue?: string - # Maximum value of the block state property range. Only present in ranged match mode. - maxValue?: string - - BlockPredicate: - blockSet?: ["registryEntryHolderSet", { - "base": { name: "name", type: "string" }, - "otherwise": { name: "blockIds", type: "varint" } - }] - properties?: BlockProperty[]varint - nbt: anonOptionalNbt - - Particle: - # See client/net/minecraft/core/particles/ParticleTypes.java - type: varint => - - angry_villager - - block - - block_marker - - bubble - - cloud - - crit - - damage_indicator - - dragon_breath - - dripping_lava - - falling_lava - - landing_lava - - dripping_water - - falling_water - - dust - - dust_color_transition - - effect - - elder_guardian - - enchanted_hit - - enchant - - end_rod - - entity_effect - - explosion_emitter - - explosion - - gust - - small_gust - - gust_emitter_large - - gust_emitter_small - - sonic_boom - - falling_dust - - firework - - fishing - - flame - - infested - - cherry_leaves - - sculk_soul - - sculk_charge - - sculk_charge_pop - - soul_fire_flame - - soul - - flash - - happy_villager - - composter - - heart - - instant_effect - - item - - vibration - - trail - - item_slime - - item_cobweb - - item_snowball - - large_smoke - - lava - - mycelium - - note - - poof - - portal - - rain - - smoke - - white_smoke - - sneeze - - spit - - squid_ink - - sweep_attack - - totem_of_undying - - underwater - - splash - - witch - - bubble_pop - - current_down - - bubble_column_up - - nautilus - - dolphin - - campfire_cosy_smoke - - campfire_signal_smoke - - dripping_honey - - falling_honey - - landing_honey - - falling_nectar - - falling_spore_blossom - - ash - - crimson_spore - - warped_spore - - spore_blossom_air - - dripping_obsidian_tear - - falling_obsidian_tear - - landing_obsidian_tear - - reverse_portal - - white_ash - - small_flame - - snowflake - - dripping_dripstone_lava - - falling_dripstone_lava - - dripping_dripstone_water - - falling_dripstone_water - - glow_squid_ink - - glow - - wax_on - - wax_off - - electric_spark - - scrape - - shriek - - egg_crack - - dust_plume - - trial_spawner_detected_player - - trial_spawner_detected_player_ominous - - vault_connection - - dust_pillar - - ominous_spawning - - raid_omen - - trial_omen - - block_crumble - ## ## Tips for reviewing particle data (as of 1.20.5) - ## Inside the registry code, each particle can have an associated "options" type and - ## each options type can add additional data to be encoded. - ## For example, this line - ## public static final ParticleType BLOCK = register("block", false, BlockParticleOption::codec, BlockParticleOption::streamCodec); - ## will read the stream codec from BlockParticleOption.java's streamCodec member; then we see - ## return ByteBufCodecs.idMapper(Block.BLOCK_STATE_REGISTRY).map(var1 -> new BlockParticleOption(var0, var1), var0x -> var0x.state); - ## this encodes with the ByteBufCodecs.idMapper function. Inside this function we find - ## public void encode(ByteBuf var1x, T var2) { - ## int var3 = var1.applyAsInt(var2); - ## VarInt.write(var1x, var3); - ## } - ## which as we can see writes the varint to the buffer. - ## If you want to see all the serializers try regexp searching "StreamCodec.*Particle" - data: type ? - if block or block_marker or falling_dust or dust_pillar or block_crumble: varint - if dust: - red: f32 - green: f32 - blue: f32 - scale: f32 - if dust_color_transition: - fromRed: f32 - fromGreen: f32 - fromBlue: f32 - scale: f32 - toRed: f32 - toGreen: f32 - toBlue: f32 - if entity_effect: i32 - if item: Slot - if sculk_charge: f32 - if shriek: varint - if vibration: - position_type: varint => - - block - - entity - position: position_type ? - if block: position - if entity: - entityId: varint - entity_eye_height: f32 - ticks: varint - if trail: - target: vec3f64 - color: u8 - ingredient: Slot[]varint - position: [ - "bitfield", - [ - { - "name": "x", - "size": 26, - "signed": true - }, - { - "name": "z", - "size": 26, - "signed": true - }, - { - "name": "y", - "size": 12, - "signed": true - } - ] - ] - soundSource: varint => - 0: master - 1: music - 2: record - 3: weather - 4: block - 5: hostile - 6: neutral - 7: player - 8: ambient - 9: voice - packedChunkPos: - z: i32 - x: i32 - previousMessages: []varint - id: varint - signature: id ? - if 0: [ - "buffer", - { - "count": 256 - } - ] - default: void - entityMetadataEntry: - key: u8 - type: varint => - - byte - - int - - long - - float - - string - - component - - optional_component - - item_stack - - boolean - - rotations - - block_pos - - optional_block_pos - - direction - - optional_uuid - - block_state - - optional_block_state - - compound_tag - - particle - - particles - - villager_data - - optional_unsigned_int - - pose - - cat_variant - - wolf_variant - - frog_variant - - optional_global_pos - - painting_variant - - sniffer_state - - armadillo_state - - vector3 - - quaternion - value: type ? - if byte: i8 - if int: varint - if long: varlong - if float: f32 - if string: string - if component: anonymousNbt - if optional_component: ["option", "anonymousNbt"] - if item_stack: Slot - if boolean: bool - if rotations: - pitch: f32 - yaw: f32 - roll: f32 - if block_pos: position - if optional_block_pos: ["option", "position"] - if direction: varint - if optional_uuid: ["option", "UUID"] - if block_state: varint - if optional_block_state: optvarint - if compound_tag: anonymousNbt - if particle: Particle - if particles: Particle[]varint - if villager_data: - villagerType: varint - villagerProfession: varint - level: varint - if optional_unsigned_int: optvarint - if pose: varint - if cat_variant: varint - if wolf_variant: ["registryEntryHolder", { - "baseName": "variantId", - "otherwise": { name: "variantData", type: "EntityMetadataWolfVariant" } - }] - if frog_variant: varint - if optional_global_pos: ["option", "string"] - if painting_variant: ["registryEntryHolder", { - "baseName": "variantId", - "otherwise": { name: "variantData", type: "EntityMetadataPaintingVariant" } - }] - if sniffer_state: varint - if armadillo_state: varint - if vector3: vec3f - if quaternion: vec4f - EntityMetadataPaintingVariant: - width: i32 - height: i32 - assetId: string - title?: anonymousNbt - author?: anonymousNbt - EntityMetadataWolfVariant: - wildTexture: string - tameTexture: string - angryTexture: string - biome: IDSet - - entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] - tags: []varint - tagName: string - entries: varint[]varint - chunkBlockEntity: - _: [ - "bitfield", - [ - { - "name": "x", - "size": 4, - "signed": false - }, - { - "name": "z", - "size": 4, - "signed": false - } - ] - ] - y: i16 - type: varint - nbtData: anonOptionalNbt - chat_session?: - uuid: UUID - publicKey: - expireTime: i64 - keyBytes: [ - "buffer", - { - "countType": "varint" - } - ] - keySignature: [ - "buffer", - { - "countType": "varint" - } - ] - game_profile: - name: string - properties: []varint - key: string - value: string - signature?: string - command_node: - flags: [ - "bitfield", - [ - { - "name": "unused", - "size": 3, - "signed": false - }, - { - "name": "has_custom_suggestions", - "size": 1, - "signed": false - }, - { - "name": "has_redirect_node", - "size": 1, - "signed": false - }, - { - "name": "has_command", - "size": 1, - "signed": false - }, - { - "name": "command_node_type", - "size": 2, - "signed": false - } - ] - ] - children: varint[]varint - redirectNode: flags/has_redirect_node ? - if 1: varint - default: void - extraNodeData: flags/command_node_type ? - if 0: void - if 1: - name: string - if 2: - name: string - parser: varint => - - brigadier:bool - - brigadier:float - - brigadier:double - - brigadier:integer - - brigadier:long - - brigadier:string - - minecraft:entity - - minecraft:game_profile - - minecraft:block_pos - - minecraft:column_pos - - minecraft:vec3 - - minecraft:vec2 - - minecraft:block_state - - minecraft:block_predicate - - minecraft:item_stack - - minecraft:item_predicate - - minecraft:color - - minecraft:component - - minecraft:style - - minecraft:message - - minecraft:nbt - - minecraft:nbt_tag - - minecraft:nbt_path - - minecraft:objective - - minecraft:objective_criteria - - minecraft:operation - - minecraft:particle - - minecraft:angle - - minecraft:rotation - - minecraft:scoreboard_slot - - minecraft:score_holder - - minecraft:swizzle - - minecraft:team - - minecraft:item_slot - - minecraft:item_slots # 1.20.5 - - minecraft:resource_location - - minecraft:function - - minecraft:entity_anchor - - minecraft:int_range - - minecraft:float_range - - minecraft:dimension - - minecraft:gamemode - - minecraft:time - - minecraft:resource_or_tag - - minecraft:resource_or_tag_key - - minecraft:resource - - minecraft:resource_key - - minecraft:template_mirror - - minecraft:template_rotation - - minecraft:heightmap - - minecraft:loot_table # 1.20.5 - - minecraft:loot_predicate # 1.20.5 - - minecraft:loot_modifier # 1.20.5 - - minecraft:uuid - properties: parser ? - if brigadier:bool: void - if brigadier:float: - flags: [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] - ] - min: flags/min_present ? - if 1: f32 - default: void - max: flags/max_present ? - if 1: f32 - default: void - if brigadier:double: - flags: [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] - ] - min: flags/min_present ? - if 1: f64 - default: void - max: flags/max_present ? - if 1: f64 - default: void - if brigadier:integer: - flags: [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] - ] - min: flags/min_present ? - if 1: i32 - default: void - max: flags/max_present ? - if 1: i32 - default: void - if brigadier:long: - flags: [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "max_present", - "size": 1, - "signed": false - }, - { - "name": "min_present", - "size": 1, - "signed": false - } - ] - ] - min: flags/min_present ? - if 1: i64 - default: void - max: flags/max_present ? - if 1: i64 - default: void - if brigadier:string: varint => - 0: SINGLE_WORD - 1: QUOTABLE_PHRASE - 2: GREEDY_PHRASE - if minecraft:entity: [ - "bitfield", - [ - { - "name": "unused", - "size": 6, - "signed": false - }, - { - "name": "onlyAllowPlayers", - "size": 1, - "signed": false - }, - { - "name": "onlyAllowEntities", - "size": 1, - "signed": false - } - ] - ] - if minecraft:game_profile: void - if minecraft:block_pos: void - if minecraft:column_pos: void - if minecraft:vec3: void - if minecraft:vec2: void - if minecraft:block_state: void - if minecraft:block_predicate: void - if minecraft:item_stack: void - if minecraft:item_predicate: void - if minecraft:color: void - if minecraft:component: void - if minecraft:message: void - if minecraft:nbt: void - if minecraft:nbt_path: void - if minecraft:objective: void - if minecraft:objective_criteria: void - if minecraft:operation: void - if minecraft:particle: void - if minecraft:angle: void - if minecraft:rotation: void - if minecraft:scoreboard_slot: void - if minecraft:score_holder: [ - "bitfield", - [ - { - "name": "unused", - "size": 7, - "signed": false - }, - { - "name": "allowMultiple", - "size": 1, - "signed": false - } - ] - ] - if minecraft:swizzle: void - if minecraft:team: void - if minecraft:item_slot: void - if minecraft:resource_location: void - if minecraft:function: void - if minecraft:entity_anchor: void - if minecraft:int_range: void - if minecraft:float_range: void - if minecraft:dimension: void - if minecraft:gamemode: void - if minecraft:time: - min: i32 - if minecraft:resource_or_tag: - registry: string - if minecraft:resource_or_tag_key: - registry: string - if minecraft:resource: - registry: string - if minecraft:resource_key: - registry: string - if minecraft:template_mirror: void - if minecraft:template_rotation: void - if minecraft:heightmap: void - if minecraft:uuid: void - suggestionType: ../flags/has_custom_suggestions ? - if 1: string - default: void - # # Shared Packets - # These are packets that are shared between multiple states. - # They are defined here to avoid duplication. - # ===== - # MC: ClientboundCookieRequestPacket - packet_common_cookie_request: - cookie: string - # MC: ClientboundStoreCookiePacket - packet_common_store_cookie: - key: string - value: ByteArray - # MC: ClientboundTransferPacket - packet_common_transfer: - host: string - port: varint - # MC: ServerboundCookieResponsePacket - packet_common_cookie_response: - key: string - value: ByteArray - # MC: ServerboundSelectKnownPacks - # MC: ClientboundSelectKnownPacks - packet_common_select_known_packs: - packs: []varint - namespace: string - id: string - version: string - # MC: ClientboundCustomReportDetailsPacket - packet_common_custom_report_details: - details: []varint - key: string - value: string - # MC: ClientboundResourcePackPopPacket - packet_common_remove_resource_pack: - uuid?: UUID - # MC: ClientboundResourcePackPushPacket - packet_common_add_resource_pack: - uuid: UUID - url: string - hash: string - forced: bool - promptMessage?: anonymousNbt - - ServerLinkType: varint => - - bug_report - - community_guidelines - - support - - status - - feedback - - community - - website - - forums - - news - - announcements - # MC: ClientboundServerLinksPacket - # This packet contains a list of links that the Notchian client will display in the menu - # available from the pause menu. Link labels can be built-in or custom (i.e., any text). - packet_common_server_links: - links: []varint - hasKnownType: bool - knownType: hasKnownType ? - if true: ServerLinkType - unknownType: hasKnownType ? - if false: anonymousNbt - link: string - -^handshaking.toClient.types: - packet: - name: varint => - params: ["switch",{"compareTo":"name","fields":{}}] -^handshaking.toServer.types: - packet_set_protocol: - protocolVersion: varint - serverHost: string - serverPort: u16 - nextState: varint - packet_legacy_server_list_ping: - payload: u8 - packet: - name: varint => - 0x00: set_protocol - 0xfe: legacy_server_list_ping - params: name ? - if set_protocol: packet_set_protocol - if legacy_server_list_ping: packet_legacy_server_list_ping -^status.toClient.types: - # MC: ClientboundStatusResponsePacket - packet_server_info: - response: string - # MC: ClientboundPongResponsePacket - packet_ping: - time: i64 - packet: - name: varint => - 0x00: server_info - 0x01: ping - params: name ? - if server_info: packet_server_info - if ping: packet_ping -^status.toServer.types: - # MC: ServerboundStatusRequestPacket - packet_ping_start: - # Empty - # MC: ServerboundPingRequestPacket - packet_ping: - time: i64 - packet: - name: varint => - 0x00: ping_start - 0x01: ping - params: name ? - if ping_start: packet_ping_start - if ping: packet_ping -^login.toClient.types: - # MC: ClientboundLoginDisconnectPacket - packet_disconnect: - reason: string - # MC: ClientboundHelloPacket - packet_encryption_begin: - serverId: string - publicKey: [ - "buffer", - { - "countType": "varint" - } - ] - verifyToken: [ - "buffer", - { - "countType": "varint" - } - ] - shouldAuthenticate: bool - # MC: ClientboundLoginFinishedPacket - packet_success: - uuid: UUID - username: string - properties: []varint - name: string - value: string - signature?: string - # MC: ClientboundLoginCompressionPacket - packet_compress: - threshold: varint - # MC: ClientboundCustomQueryPacket - packet_login_plugin_request: - messageId: varint - channel: string - data: restBuffer - ## (Cookie Request is Common) ## - packet: - name: varint => - - disconnect - - encryption_begin - - success - - compress - - login_plugin_request - - cookie_request - params: name ? - if disconnect: packet_disconnect - if encryption_begin: packet_encryption_begin - if success: packet_success - if compress: packet_compress - if login_plugin_request: packet_login_plugin_request - if cookie_request: packet_common_cookie_request -^login.toServer.types: - # MC: ServerboundHelloPacket - packet_login_start: - username: string - playerUUID: UUID - # MC: ServerboundKeyPacket - packet_encryption_begin: - sharedSecret: [ - "buffer", - { - "countType": "varint" - } - ] - verifyToken: [ - "buffer", - { - "countType": "varint" - } - ] - # MC: ServerboundCustomQueryAnswerPacket - packet_login_plugin_response: - messageId: varint - data?: restBuffer - # MC: ServerboundLoginAcknowledgedPacket - packet_login_acknowledged: - # Empty - ## (Cookie Response is Common) ## - packet: - name: varint => - - login_start - - encryption_begin - - login_plugin_response - - login_acknowledged - - cookie_response - params: name ? - if login_start: packet_login_start - if encryption_begin: packet_encryption_begin - if login_plugin_response: packet_login_plugin_response - if login_acknowledged: packet_login_acknowledged - if cookie_response: packet_common_cookie_response -^configuration.toClient.types: - ## (Cookie Request is common) - # MC: ClientboundCustomPayloadPacket - packet_custom_payload: - channel: string - data: restBuffer - # MC: ClientboundDisconnectPacket - packet_disconnect: - reason: anonymousNbt - # MC: ClientboundFinishConfigurationPacket - packet_finish_configuration: - # Empty - # MC: ClientboundKeepAlivePacket - packet_keep_alive: - keepAliveId: i64 - # MC: ClientboundPingPacket - packet_ping: - id: i32 - # MC: ClientboundResetChatPacket - packet_reset_chat: - # Empty - # MC: ClientboundRegistryDataPacket - packet_registry_data: - # The server can send multiple registries - id: string - entries: []varint - key: string - value?: anonymousNbt - ## (Store cookie and Transfer are Common) ## - # MC: ClientboundUpdateEnabledFeaturesPacket - packet_feature_flags: - features: string[]varint - # MC: ClientboundUpdateTagsPacket - packet_tags: - tags: []varint - tagType: string - tags: tags - ## (Select known packs is common) - packet: - name: varint => - - cookie_request - - custom_payload - - disconnect - - finish_configuration - - keep_alive - - ping - - reset_chat - - registry_data - - remove_resource_pack - - add_resource_pack - - store_cookie - - transfer - - feature_flags - - tags - - select_known_packs - - custom_report_details - - server_links - params: name ? - if cookie_request: packet_common_cookie_request - if custom_payload: packet_custom_payload - if disconnect: packet_disconnect - if finish_configuration: packet_finish_configuration - if keep_alive: packet_keep_alive - if ping: packet_ping - if reset_chat: packet_reset_chat - if registry_data: packet_registry_data - if remove_resource_pack: packet_common_remove_resource_pack - if add_resource_pack: packet_common_add_resource_pack - if store_cookie: packet_common_store_cookie - if transfer: packet_common_transfer - if feature_flags: packet_feature_flags - if tags: packet_tags - if select_known_packs: packet_common_select_known_packs - if custom_report_details: packet_common_custom_report_details - if server_links: packet_common_server_links -^configuration.toServer.types: - # MC: ServerboundClientInformationPacket - packet_settings: - locale: string - viewDistance: i8 - chatFlags: varint - chatColors: bool - skinParts: u8 - mainHand: varint - enableTextFiltering: bool - enableServerListing: bool - particles: varint - ## (Cookie Response is Common) ## - # MC: ServerboundCustomPayloadPacket - packet_custom_payload: - channel: string - data: restBuffer - # MC: ServerboundFinishConfigurationPacket - packet_finish_configuration: - # Empty - # MC: ServerboundKeepAlivePacket - packet_keep_alive: - keepAliveId: i64 - # MC: ServerboundPongPacket - packet_pong: - id: i32 - # MC: ServerboundResourcePackPacket - packet_resource_pack_receive: - uuid: UUID - result: varint - packet: - name: varint => - - settings - - cookie_response - - custom_payload - - finish_configuration - - keep_alive - - pong - - resource_pack_receive - - select_known_packs - - custom_report_details - - server_links - params: name ? - if settings: packet_settings - if cookie_response: packet_common_cookie_response - if custom_payload: packet_custom_payload - if finish_configuration: packet_finish_configuration - if keep_alive: packet_keep_alive - if pong: packet_pong - if resource_pack_receive: packet_resource_pack_receive - if select_known_packs: packet_common_select_known_packs - if custom_report_details: packet_common_custom_report_details - if server_links: packet_common_server_links -^play.toClient.types: - # World state information for spawn and respawn packets - # World state information for spawn and respawn packets - SpawnInfo: - dimension: varint - name: string - hashedSeed: i64 - gamemode: i8 => - - survival - - creative - - adventure - - spectator - previousGamemode: u8 - isDebug: bool - isFlat: bool - death?: - dimensionName: string - location: position - portalCooldown: varint - seaLevel: varint - - # MC: ClientboundAddEntityPacket - packet_spawn_entity: - entityId: varint - objectUUID: UUID - type: varint - x: f64 - y: f64 - z: f64 - pitch: i8 - yaw: i8 - headPitch: i8 - objectData: varint - velocityX: i16 - velocityY: i16 - velocityZ: i16 - # MC: ClientboundAddExperienceOrbPacket - packet_spawn_entity_experience_orb: - entityId: varint - x: f64 - y: f64 - z: f64 - count: i16 - # MC: ClientboundAnimatePacket - packet_animation: - entityId: varint - animation: u8 - # MC: ClientboundAwardStatsPacket - packet_statistics: - entries: []varint - categoryId: varint - statisticId: varint - value: varint - # MC: ClientboundBlockChangedAckPacket - packet_acknowledge_player_digging: - sequenceId: varint - # MC: ClientboundBlockDestructionPacket - packet_block_break_animation: - entityId: varint - location: position - destroyStage: i8 - # MC: ClientboundBlockEntityDataPacket - packet_tile_entity_data: - location: position - action: varint - nbtData: anonOptionalNbt - # MC: ClientboundBlockEventPacket - packet_block_action: - location: position - byte1: u8 - byte2: u8 - blockId: varint - # MC: ClientboundBlockUpdatePacket - packet_block_change: - location: position - type: varint - # MC: ClientboundBossEventPacket - packet_boss_bar: - entityUUID: UUID - action: varint - title: action ? - if 0: anonymousNbt - if 3: anonymousNbt - default: void - health: action ? - if 0: f32 - if 2: f32 - default: void - color: action ? - if 0: varint - if 4: varint - default: void - dividers: action ? - if 0: varint - if 4: varint - default: void - flags: action ? - if 0: u8 - if 5: u8 - default: void - # MC: ClientboundChangeDifficultyPacket - packet_difficulty: - difficulty: u8 - difficultyLocked: bool - # MC: ClientboundChunkBatchFinishedPacket - packet_chunk_batch_finished: - batchSize: varint - # MC: ClientboundChunkBatchStartPacket - packet_chunk_batch_start: - # Empty - # MC: ClientboundChunksBiomesPacket - packet_chunk_biomes: - biomes: []varint - position: packedChunkPos - data: ByteArray - # MC: ClientboundClearTitlesPacket - packet_clear_titles: - reset: bool - # MC: ClientboundCommandSuggestionsPacket - packet_tab_complete: - transactionId: varint - start: varint - length: varint - matches: []varint - match: string - tooltip?: anonymousNbt - # MC: ClientboundCommandsPacket - packet_declare_commands: - nodes: command_node[]varint - rootIndex: varint - # MC: ClientboundContainerClosePacket - packet_close_window: - windowId: ContainerID - # MC: ClientboundContainerSetContentPacket - packet_window_items: - windowId: ContainerID - stateId: varint - items: Slot[]varint - carriedItem: Slot - # MC: ClientboundContainerSetDataPacket - packet_craft_progress_bar: - windowId: ContainerID - property: i16 - value: i16 - # MC: ClientboundContainerSetSlotPacket - packet_set_slot: - windowId: ContainerID - stateId: varint - slot: i16 - item: Slot - ## (Cookie Request is Common) - # MC: ClientboundCooldownPacket - packet_set_cooldown: - # TODO: figure out what this is - cooldownGroup: string - cooldownTicks: varint - # MC: ClientboundCustomChatCompletionsPacket - packet_chat_suggestions: - action: varint - entries: string[]varint - # MC: ClientboundCustomPayloadPacket - packet_custom_payload: - channel: string - data: restBuffer - # MC: ClientboundDamageEventPacket - packet_damage_event: - entityId: varint - sourceTypeId: varint - sourceCauseId: varint - sourceDirectId: varint - sourcePosition?: vec3f64 - # MC: ClientboundDebugSamplePacket - packet_debug_sample: - sample: i64[]varint - type: varint - # MC: ClientboundDeleteChatPacket - packet_hide_message: - id: varint - signature: id ? - if 0: [ - "buffer", - { - "count": 256 - } - ] - default: void - # MC: ClientboundDisconnectPacket - packet_kick_disconnect: - reason: anonymousNbt - - ## client\net\minecraft\network\chat\ChatTypeDecoration.java - ## via client\net\minecraft\network\chat\ChatType.java - ChatTypeParameterType: varint => - - content - - sender - - target - ChatType: - translationKey: string - parameters: ChatTypeParameterType[]varint - style: anonymousNbt - ChatTypes: - # Either the extra data is retrieved from the registry (via this ID+1 if non-zero), or it's supplied inline in the chat packet - registryIndex: varint - _: registryIndex ? - if 0: - chat: ChatType - narration: ChatType - default: void - - # MC: ClientboundDisguisedChatPacket - packet_profileless_chat: - message: anonymousNbt - type: ChatTypes - name: anonymousNbt - target?: anonymousNbt - # MC: ClientboundEntityEventPacket - packet_entity_status: - entityId: i32 - entityStatus: i8 - # MC: ClientboundEntityPositionSyncPacket - packet_sync_entity_position: - entityId: varint - x: f64 - y: f64 - z: f64 - dx: f64 - dy: f64 - dz: f64 - yaw: f32 - pitch: f32 - onGround: bool - # MC: ClientboundExplodePacket - packet_explosion: - center: vec3f - playerKnockback?: vec3f - explosionParticle: Particle - soundId: varint - _: soundId ? - if 0: - soundName: string - range?: f32 - default: - - # MC: ClientboundForgetLevelChunkPacket - packet_unload_chunk: - chunkZ: i32 - chunkX: i32 - # MC: ClientboundGameEventPacket - packet_game_state_change: - reason: u8 - gameMode: f32 - # MC: ClientboundHorseScreenOpenPacket - packet_open_horse_window: - windowId: ContainerID - nbSlots: varint - entityId: i32 - # MC: ClientboundHurtAnimationPacket - packet_hurt_animation: - entityId: varint - yaw: f32 - # MC: ClientboundInitializeBorderPacket - packet_initialize_world_border: - x: f64 - z: f64 - oldDiameter: f64 - newDiameter: f64 - speed: varint - portalTeleportBoundary: varint - warningBlocks: varint - warningTime: varint - # MC: ClientboundKeepAlivePacket - packet_keep_alive: - keepAliveId: i64 - # MC: ClientboundLevelChunkWithLightPacket - packet_map_chunk: - x: i32 - z: i32 - heightmaps: anonymousNbt - chunkData: [ - "buffer", - { - "countType": "varint" - } - ] - blockEntities: chunkBlockEntity[]varint - skyLightMask: i64[]varint - blockLightMask: i64[]varint - emptySkyLightMask: i64[]varint - emptyBlockLightMask: i64[]varint - skyLight: []varint - _: u8[]varint - blockLight: []varint - _: u8[]varint - # MC: ClientboundLevelEventPacket - packet_world_event: - effectId: i32 - location: position - data: i32 - global: bool - # MC: ClientboundLevelParticlesPacket - packet_world_particles: - longDistance: bool - x: f64 - y: f64 - z: f64 - offsetX: f32 - offsetY: f32 - offsetZ: f32 - velocityOffset: f32 - amount: i32 - particle: Particle - # MC: ClientboundLightUpdatePacket - packet_update_light: - chunkX: varint - chunkZ: varint - skyLightMask: i64[]varint - blockLightMask: i64[]varint - emptySkyLightMask: i64[]varint - emptyBlockLightMask: i64[]varint - skyLight: []varint - _: u8[]varint - blockLight: []varint - _: u8[]varint - # MC: ClientboundLoginPacket - packet_login: - entityId: i32 - isHardcore: bool - worldNames: string[]varint - maxPlayers: varint - viewDistance: varint - simulationDistance: varint - reducedDebugInfo: bool - enableRespawnScreen: bool - doLimitedCrafting: bool - worldState: SpawnInfo - enforcesSecureChat: bool - # MC: ClientboundMapItemDataPacket - packet_map: - itemDamage: varint - scale: i8 - locked: bool - icons?: []varint - type: varint - x: i8 - z: i8 - direction: u8 - displayName?: anonymousNbt - columns: u8 - rows: columns ? - if 0: void - default: u8 - x: columns ? - if 0: void - default: u8 - y: columns ? - if 0: void - default: u8 - data: columns ? - if 0: void - default: [ - "buffer", - { - "countType": "varint" - } - ] - # MC: ClientboundMerchantOffersPacket - packet_trade_list: - windowId: ContainerID - ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/MerchantOffer.java#L210 - trades: []varint - inputItem1: - itemId: varint - itemCount: varint - addedComponentCount: varint - components: SlotComponent[]$addedComponentCount - outputItem: Slot - inputItem2?: - itemId: varint - itemCount: varint - addedComponentCount: varint - components: SlotComponent[]$addedComponentCount - tradeDisabled: bool - nbTradeUses: i32 - maximumNbTradeUses: i32 - xp: i32 - specialPrice: i32 - priceMultiplier: f32 - demand: i32 - villagerLevel: varint - experience: varint - isRegularVillager: bool - canRestock: bool - # MC: ClientboundMoveEntityPacket.Pos - packet_rel_entity_move: - entityId: varint - dX: i16 - dY: i16 - dZ: i16 - onGround: bool - # MC: ClientboundMoveEntityPacket.PosRot - packet_entity_move_look: - entityId: varint - dX: i16 - dY: i16 - dZ: i16 - yaw: i8 - pitch: i8 - onGround: bool - # MC: ClientboundMoveMinecartPacket - packet_move_minecart: - entityId: varint - steps: []varint - position: vec3f - movement: vec3f - yaw: f32 - pitch: f32 - weight: f32 - # MC: ClientboundMoveEntityPacket.Rot - packet_entity_look: - entityId: varint - yaw: i8 - pitch: i8 - onGround: bool - # MC: ClientboundMoveVehiclePacket - packet_vehicle_move: - x: f64 - y: f64 - z: f64 - yaw: f32 - pitch: f32 - # MC: ClientboundOpenBookPacket - packet_open_book: - hand: varint - # MC: ClientboundOpenScreenPacket - packet_open_window: - windowId: varint - inventoryType: varint - windowTitle: anonymousNbt - # MC: ClientboundOpenSignEditorPacket - packet_open_sign_entity: - location: position - isFrontText: bool - # MC: ClientboundPingPacket - packet_ping: - id: i32 - # MC: ClientboundPongResponsePacket - packet_ping_response: - id: i64 - # MC: ClientboundPlaceGhostRecipePacket - packet_craft_recipe_response: - windowId: ContainerID - recipeDisplay: RecipeDisplay - # MC: ClientboundPlayerAbilitiesPacket - packet_abilities: - flags: i8 - flyingSpeed: f32 - walkingSpeed: f32 - # MC: ClientboundPlayerChatPacket - packet_player_chat: - senderUuid: UUID - index: varint - signature?: [ - "buffer", - { - "count": 256 - } - ] - plainMessage: string - timestamp: i64 - salt: i64 - previousMessages: previousMessages - unsignedChatContent?: anonymousNbt - filterType: varint - filterTypeMask: filterType ? - if 2: i64[]varint - default: void - type: ChatTypes - networkName: anonymousNbt - networkTargetName?: anonymousNbt - # MC: ClientboundPlayerCombatEndPacket - packet_end_combat_event: - duration: varint - # MC: ClientboundPlayerCombatEnterPacket - packet_enter_combat_event: - # Empty - # MC: ClientboundPlayerCombatKillPacket - packet_death_combat_event: - playerId: varint - message: anonymousNbt - # MC: ClientboundPlayerInfoRemovePacket - packet_player_remove: - players: UUID[]varint - # MC: ClientboundPlayerInfoUpdatePacket - packet_player_info: - action: ["bitflags", { - "type": "u8", - "flags": [ - "add_player", - "initialize_chat", - "update_game_mode", - "update_listed", - "update_latency", - "update_display_name", - "update_priority" - ] - }] - data: []varint - uuid: UUID - player: ../action/add_player ? - if true: game_profile - default: void - chatSession: ../action/initialize_chat ? - if true: chat_session - default: void - gamemode: ../action/update_game_mode ? - if true: varint - default: void - listed: ../action/update_listed ? - if true: varint - default: void - latency: ../action/update_latency ? - if true: varint - default: void - displayName: ../action/update_display_name ? - if true: anonOptionalNbt - default: void - listPriority: ../action/update_priority ? - if true: varint - default: void - - # MC: ClientboundPlayerLookAtPacket - packet_face_player: - feet_eyes: varint - x: f64 - y: f64 - z: f64 - isEntity: bool - entityId: isEntity ? - if true: varint - default: void - entity_feet_eyes: isEntity ? - if true: varint - default: void - - # https://github.com/extremeheat/extracted_minecraft_data/blob/client1.21.2/client/net/minecraft/world/entity/Relative.java#L82 - PositionUpdateRelatives: ["bitflags", { - "type": "u32", - "flags": ["x", "y", "z", "yaw", "pitch", "dx", "dy", "dz", "yawDelta"] - }] - # PositionUpdateRelatives: ["bitfield", [ - # # unused bits on top - # { "name": "unused", "size": 23, "signed": false }, - # { "name": "yawDelta", "size": 1, "signed": false }, - # { "name": "dz", "size": 1, "signed": false }, - # { "name": "dy", "size": 1, "signed": false }, - # { "name": "dx", "size": 1, "signed": false }, - # { "name": "pitch", "size": 1, "signed": false }, - # { "name": "yaw", "size": 1, "signed": false }, - # { "name": "z", "size": 1, "signed": false }, - # { "name": "y", "size": 1, "signed": false }, - # { "name": "x", "size": 1, "signed": false }, - # ]] - # MC: ClientboundPlayerPositionPacket - packet_position: - teleportId: varint - x: f64 - y: f64 - z: f64 - dx: f64 - dy: f64 - dz: f64 - yaw: f32 - pitch: f32 - flags: PositionUpdateRelatives - # MC: ClientboundPlayerRotationPacket - packet_player_rotation: - yaw: f32 - pitch: f32 - - # MC: ClientboundRecipeBookAddPacket - packet_recipe_book_add: - entries: []varint - # RecipeDisplayEntry - recipe: - displayId: varint - display: RecipeDisplay - group: optvarint - # This ID corresponds to the "recipe_book_category" registry - category: varint => - - crafting_building_blocks - - crafting_redstone - - crafting_equipment - - crafting_misc - - furnace_food - - furnace_blocks - - furnace_misc - - blast_furnace_blocks - - blast_furnace_misc - - smoker_food - - stonecutter - - smithing - - campfire - craftingRequirements?: IDSet[]varint - flags: ["bitflags", { - "type": "u8", - "flags": ["notification", "highlight"] - }] - replace: bool - # MC: ClientboundRecipeBookRemovePacket - packet_recipe_book_remove: - recipeIds: varint[]varint - # MC: ClientboundRecipeBookSettingsPacket - packet_recipe_book_settings: - craftingGuiOpen: bool - craftingFilteringCraftable: bool - smeltingGuiOpen: bool - smeltingFilteringCraftable: bool - blastGuiOpen: bool - blastFilteringCraftable: bool - smokerGuiOpen: bool - smokerFilteringCraftable: bool - # MC: ClientboundRemoveEntitiesPacket - packet_entity_destroy: - entityIds: varint[]varint - # MC: ClientboundRemoveMobEffectPacket - packet_remove_entity_effect: - entityId: varint - effectId: varint - # MC: ClientboundResetScorePacket - packet_reset_score: - entity_name: string - objective_name?: string - # MC: ClientboundRespawnPacket - packet_respawn: - worldState: SpawnInfo - # Bit field: 0b1 - KEEP_ATTRIBUTE_MODIFIERS, 0b10 - KEEP_ENTITY_DATA - copyMetadata: u8 - # MC: ClientboundRotateHeadPacket - packet_entity_head_rotation: - entityId: varint - headYaw: i8 - # MC: ClientboundSectionBlocksUpdatePacket - packet_multi_block_change: - chunkCoordinates: [ "bitfield", [ - { "name": "x", "size": 22, "signed": true }, - { "name": "z", "size": 22, "signed": true }, - { "name": "y", "size": 20, "signed": true } - ]] - records: varint[]varint - # MC: ClientboundSelectAdvancementsTabPacket - packet_select_advancement_tab: - id?: string - # MC: ClientboundServerDataPacket - packet_server_data: - motd: anonymousNbt - iconBytes?: ByteArray - # MC: ClientboundSetActionBarTextPacket - packet_action_bar: - text: anonymousNbt - # MC: ClientboundSetBorderCenterPacket - packet_world_border_center: - x: f64 - z: f64 - # MC: ClientboundSetBorderLerpSizePacket - packet_world_border_lerp_size: - oldDiameter: f64 - newDiameter: f64 - speed: varint - # MC: ClientboundSetBorderSizePacket - packet_world_border_size: - diameter: f64 - # MC: ClientboundSetBorderWarningDelayPacket - packet_world_border_warning_delay: - warningTime: varint - # MC: ClientboundSetBorderWarningDistancePacket - packet_world_border_warning_reach: - warningBlocks: varint - # MC: ClientboundSetCameraPacket - packet_camera: - cameraId: varint - # MC: ClientboundSetChunkCacheCenterPacket - packet_update_view_position: - chunkX: varint - chunkZ: varint - # MC: ClientboundSetChunkCacheRadiusPacket - packet_update_view_distance: - viewDistance: varint - # MC: ClientboundSetCursorItemPacket - packet_set_cursor_item: - contents?: Slot - # MC: ClientboundSetDefaultSpawnPositionPacket - packet_spawn_position: - location: position - angle: f32 - # MC: ClientboundSetDisplayObjectivePacket - packet_scoreboard_display_objective: - position: varint - name: string - # MC: ClientboundSetEntityDataPacket - packet_entity_metadata: - entityId: varint - metadata: entityMetadata - # MC: ClientboundSetEntityLinkPacket - packet_attach_entity: - entityId: i32 - vehicleId: i32 - # MC: ClientboundSetEntityMotionPacket - packet_entity_velocity: - entityId: varint - velocityX: i16 - velocityY: i16 - velocityZ: i16 - # MC: ClientboundSetEquipmentPacket - packet_entity_equipment: - entityId: varint - equipments: [ - "topBitSetTerminatedArray", - { - "type": [ - "container", - [ - { - "name": "slot", - "type": "i8" - }, - { - "name": "item", - "type": "Slot" - } - ] - ] - } - ] - # MC: ClientboundSetExperiencePacket - packet_experience: - experienceBar: f32 - level: varint - totalExperience: varint - # MC: ClientboundSetHealthPacket - packet_update_health: - health: f32 - food: varint - foodSaturation: f32 - # MC: ClientboundSetHeldSlotPacket - packet_held_item_slot: - slot: i8 - # MC: ClientboundSetObjectivePacket - packet_scoreboard_objective: - name: string - action: i8 - displayText: action ? - if 0: anonymousNbt - if 2: anonymousNbt - default: void - type: action ? - if 0: varint - if 2: varint - default: void - number_format: action ? - if 0: [ - "option", - "varint" - ] - if 2: [ - "option", - "varint" - ] - default: void - styling: action ? - if 0: number_format ? - if 1: anonymousNbt - if 2: anonymousNbt - default: void - if 2: number_format ? - if 1: anonymousNbt - if 2: anonymousNbt - default: void - default: void - # MC: ClientboundSetPassengersPacket - packet_set_passengers: - entityId: varint - passengers: varint[]varint - # MC: ClientboundSetPlayerInventoryPacket - packet_set_player_inventory: - slotId: varint - contents?: Slot - # MC: ClientboundSetPlayerTeamPacket - packet_teams: - team: string - mode: i8 - name: mode ? - if 0: anonymousNbt - if 2: anonymousNbt - default: void - friendlyFire: mode ? - if 0: i8 - if 2: i8 - default: void - nameTagVisibility: mode ? - if 0: string - if 2: string - default: void - collisionRule: mode ? - if 0: string - if 2: string - default: void - formatting: mode ? - if 0: varint - if 2: varint - default: void - prefix: mode ? - if 0: anonymousNbt - if 2: anonymousNbt - default: void - suffix: mode ? - if 0: anonymousNbt - if 2: anonymousNbt - default: void - players: mode ? - if 0: string[]varint - if 3: string[]varint - if 4: string[]varint - default: void - # MC: ClientboundSetScorePacket - packet_scoreboard_score: - itemName: string - scoreName: string - value: varint - display_name?: anonymousNbt - number_format?: varint - styling: number_format ? - if 1: anonymousNbt - if 2: anonymousNbt - default: void - # MC: ClientboundSetSimulationDistancePacket - packet_simulation_distance: - distance: varint - # MC: ClientboundSetSubtitleTextPacket - packet_set_title_subtitle: - text: anonymousNbt - # MC: ClientboundSetTimePacket - packet_update_time: - age: i64 - time: i64 - tickDayTime: bool - # MC: ClientboundSetTitleTextPacket - packet_set_title_text: - text: anonymousNbt - # MC: ClientboundSetTitlesAnimationPacket - packet_set_title_time: - fadeIn: i32 - stay: i32 - fadeOut: i32 - # MC: ClientboundSoundEntityPacket - packet_entity_sound_effect: - soundId: varint - soundEvent: soundId ? - if 0: - resource: string - range?: f32 - default: void - soundCategory: soundSource - entityId: varint - volume: f32 - pitch: f32 - seed: i64 - # MC: ClientboundSoundPacket - packet_sound_effect: - soundId: varint - soundEvent: soundId ? - if 0: - resource: string - range?: f32 - default: void - soundCategory: soundSource - x: i32 - y: i32 - z: i32 - volume: f32 - pitch: f32 - seed: i64 - # MC: ClientboundStartConfigurationPacket - packet_start_configuration: - # Empty - # MC: ClientboundStopSoundPacket - packet_stop_sound: - flags: i8 - source: flags ? - if 1: varint - if 3: varint - default: void - sound: flags ? - if 2: string - if 3: string - default: void - ## (Store Cookie is Common) - # MC: ClientboundSystemChatPacket - packet_system_chat: - content: anonymousNbt - isActionBar: bool - # MC: ClientboundTabListPacket - packet_playerlist_header: - header: anonymousNbt - footer: anonymousNbt - # MC: ClientboundTagQueryPacket - packet_nbt_query_response: - transactionId: varint - nbt: anonOptionalNbt - # MC: ClientboundTakeItemEntityPacket - packet_collect: - collectedEntityId: varint - collectorEntityId: varint - pickupItemCount: varint - # MC: ClientboundTeleportEntityPacket - packet_entity_teleport: - entityId: varint - x: f64 - y: f64 - z: f64 - yaw: i8 - pitch: i8 - onGround: bool - # MC: ClientboundTickingStatePacket - packet_set_ticking_state: - tick_rate: f32 - is_frozen: bool - # MC: ClientboundTickingStepPacket - packet_step_tick: - tick_steps: varint - ## (Transfer is common) - # MC: ClientboundUpdateAdvancementsPacket - packet_advancements: - reset: bool - advancementMapping: []varint - key: string - value: - parentId?: string - displayData?: - title: anonymousNbt - description: anonymousNbt - icon: Slot - frameType: varint - flags: ["bitfield", [ - { "name": "unused", "size": 29, "signed": false }, - { "name": "hidden", "size": 1, "signed": false }, - { "name": "show_toast", "size": 1, "signed": false }, - { "name": "has_background_texture", "size": 1, "signed": false } - ]] - backgroundTexture: flags/has_background_texture ? - if 1: string - default: void - xCord: f32 - yCord: f32 - requirements: []varint - _: string[]varint - sendsTelemtryData: bool - identifiers: string[]varint - progressMapping: []varint - key: string - value: []varint - criterionIdentifier: string - criterionProgress?: i64 - # MC: ClientboundUpdateAttributesPacket - packet_entity_update_attributes: - entityId: varint - properties: []varint - key: varint => - - generic.armor - - generic.armor_toughness - - generic.attack_damage - - generic.attack_knockback - - generic.attack_speed - - player.block_break_speed - - player.block_interaction_range - - player.entity_interaction_range - - generic.fall_damage_multiplier - - generic.flying_speed - - generic.follow_range - - generic.gravity - - generic.jump_strength - - generic.knockback_resistance - - generic.luck - - generic.max_absorption - - generic.max_health - - generic.movement_speed - - generic.safe_fall_distance - - generic.scale - - zombie.spawn_reinforcements - - generic.step_height - value: f64 - modifiers: []varint - uuid: string - amount: f64 - operation: i8 - # MC: ClientboundUpdateMobEffectPacket - packet_entity_effect: - entityId: varint - effectId: varint - amplifier: varint - duration: varint - # a bitfield of 0x01 for ambient, 0x02 for show particles - # flags: ["bitfield", [ - # { "name": "unused", "size": 4 }, - # { "name": "ambient", "size": 1 }, - # { "name": "showParticles", "size": 1 }, - # { "name": "showIcon", "size": 1 }, - # { "name": "blend", "size": 1 } - # ]] - flags: u8 - # MC: ClientboundUpdateRecipesPacket - packet_declare_recipes: - recipes: []varint - name: string - items: varint[]varint - stoneCutterRecipes: []varint - input: IDSet - slotDisplay: SlotDisplay - - # MC: ClientboundUpdateTagsPacket - packet_tags: - tags: []varint - tagType: string - tags: tags - # MC: ClientboundProjectilePowerPacket - packet_set_projectile_power: - id: varint - accelerationPower: f64 - ## (ClientboundCustomReportDetailsPacket, ClientboundServerLinksPacket is common) - - packet: - name: varint => - - bundle_delimiter - - spawn_entity - - spawn_entity_experience_orb - - animation - - statistics - - acknowledge_player_digging - - block_break_animation - - tile_entity_data - - block_action - - block_change - - boss_bar - - difficulty - - chunk_batch_finished - - chunk_batch_start - - chunk_biomes - - clear_titles - - tab_complete - - declare_commands - - close_window - - window_items - - craft_progress_bar - - set_slot - - cookie_request - - set_cooldown - - chat_suggestions - - custom_payload - - damage_event - - debug_sample - - hide_message - - kick_disconnect - - profileless_chat - - entity_status - - sync_entity_position - - explosion - - unload_chunk - - game_state_change - - open_horse_window - - hurt_animation - - initialize_world_border - - keep_alive - - map_chunk - - world_event - - world_particles - - update_light - - login - - map - - trade_list - - rel_entity_move - - entity_move_look - - move_minecart - - entity_look - - vehicle_move - - open_book - - open_window - - open_sign_entity - - ping - - ping_response - - craft_recipe_response - - abilities - - player_chat - - end_combat_event - - enter_combat_event - - death_combat_event - - player_remove - - player_info - - face_player - - position - - player_rotation - - recipe_book_add - - recipe_book_remove - - recipe_book_settings - - entity_destroy - - remove_entity_effect - - reset_score - - remove_resource_pack - - add_resource_pack - - respawn - - entity_head_rotation - - multi_block_change - - select_advancement_tab - - server_data - - action_bar - - world_border_center - - world_border_lerp_size - - world_border_size - - world_border_warning_delay - - world_border_warning_reach - - camera - - update_view_position - - update_view_distance - - set_cursor_item - - spawn_position - - scoreboard_display_objective - - entity_metadata - - attach_entity - - entity_velocity - - entity_equipment - - experience - - update_health - - held_item_slot - - scoreboard_objective - - set_passengers - - set_player_inventory - - teams - - scoreboard_score - - simulation_distance - - set_title_subtitle - - update_time - - set_title_text - - set_title_time - - entity_sound_effect - - sound_effect - - start_configuration - - stop_sound - - store_cookie - - system_chat - - playerlist_header - - nbt_query_response - - collect - - entity_teleport - - set_ticking_state - - step_tick - - transfer - - advancements - - entity_update_attributes - - entity_effect - - declare_recipes - - tags - - set_projectile_power - - custom_report_details - - server_links - params: name ? - if bundle_delimiter: void - if spawn_entity: packet_spawn_entity - if spawn_entity_experience_orb: packet_spawn_entity_experience_orb - if animation: packet_animation - if statistics: packet_statistics - if acknowledge_player_digging: packet_acknowledge_player_digging - if block_break_animation: packet_block_break_animation - if tile_entity_data: packet_tile_entity_data - if block_action: packet_block_action - if block_change: packet_block_change - if boss_bar: packet_boss_bar - if difficulty: packet_difficulty - if chunk_batch_finished: packet_chunk_batch_finished - if chunk_batch_start: packet_chunk_batch_start - if chunk_biomes: packet_chunk_biomes - if clear_titles: packet_clear_titles - if tab_complete: packet_tab_complete - if declare_commands: packet_declare_commands - if close_window: packet_close_window - if window_items: packet_window_items - if craft_progress_bar: packet_craft_progress_bar - if set_slot: packet_set_slot - if cookie_request: packet_common_cookie_request - if set_cooldown: packet_set_cooldown - if chat_suggestions: packet_chat_suggestions - if custom_payload: packet_custom_payload - if damage_event: packet_damage_event - if debug_sample: packet_debug_sample - if hide_message: packet_hide_message - if kick_disconnect: packet_kick_disconnect - if profileless_chat: packet_profileless_chat - if entity_status: packet_entity_status - if sync_entity_position: packet_sync_entity_position - if explosion: packet_explosion - if unload_chunk: packet_unload_chunk - if game_state_change: packet_game_state_change - if open_horse_window: packet_open_horse_window - if hurt_animation: packet_hurt_animation - if initialize_world_border: packet_initialize_world_border - if keep_alive: packet_keep_alive - if map_chunk: packet_map_chunk - if world_event: packet_world_event - if world_particles: packet_world_particles - if update_light: packet_update_light - if login: packet_login - if map: packet_map - if trade_list: packet_trade_list - if rel_entity_move: packet_rel_entity_move - if entity_move_look: packet_entity_move_look - if move_minecart: packet_move_minecart - if entity_look: packet_entity_look - if vehicle_move: packet_vehicle_move - if open_book: packet_open_book - if open_window: packet_open_window - if open_sign_entity: packet_open_sign_entity - if ping: packet_ping - if ping_response: packet_ping_response - if craft_recipe_response: packet_craft_recipe_response - if abilities: packet_abilities - if player_chat: packet_player_chat - if end_combat_event: packet_end_combat_event - if enter_combat_event: packet_enter_combat_event - if death_combat_event: packet_death_combat_event - if player_remove: packet_player_remove - if player_info: packet_player_info - if face_player: packet_face_player - if position: packet_position - if player_rotation: packet_player_rotation - if recipe_book_add: packet_recipe_book_add - if recipe_book_remove: packet_recipe_book_remove - if recipe_book_settings: packet_recipe_book_settings - if entity_destroy: packet_entity_destroy - if remove_entity_effect: packet_remove_entity_effect - if reset_score: packet_reset_score - if remove_resource_pack: packet_common_remove_resource_pack - if add_resource_pack: packet_common_add_resource_pack - if respawn: packet_respawn - if entity_head_rotation: packet_entity_head_rotation - if multi_block_change: packet_multi_block_change - if select_advancement_tab: packet_select_advancement_tab - if server_data: packet_server_data - if action_bar: packet_action_bar - if world_border_center: packet_world_border_center - if world_border_lerp_size: packet_world_border_lerp_size - if world_border_size: packet_world_border_size - if world_border_warning_delay: packet_world_border_warning_delay - if world_border_warning_reach: packet_world_border_warning_reach - if camera: packet_camera - if update_view_position: packet_update_view_position - if update_view_distance: packet_update_view_distance - if set_cursor_item: packet_set_cursor_item - if held_item_slot: packet_held_item_slot - if spawn_position: packet_spawn_position - if scoreboard_display_objective: packet_scoreboard_display_objective - if entity_metadata: packet_entity_metadata - if attach_entity: packet_attach_entity - if entity_velocity: packet_entity_velocity - if entity_equipment: packet_entity_equipment - if experience: packet_experience - if update_health: packet_update_health - if scoreboard_objective: packet_scoreboard_objective - if set_passengers: packet_set_passengers - if set_player_inventory: packet_set_player_inventory - if teams: packet_teams - if scoreboard_score: packet_scoreboard_score - if simulation_distance: packet_simulation_distance - if set_title_subtitle: packet_set_title_subtitle - if update_time: packet_update_time - if set_title_text: packet_set_title_text - if set_title_time: packet_set_title_time - if entity_sound_effect: packet_entity_sound_effect - if sound_effect: packet_sound_effect - if start_configuration: packet_start_configuration - if stop_sound: packet_stop_sound - if store_cookie: packet_common_store_cookie - if system_chat: packet_system_chat - if playerlist_header: packet_playerlist_header - if nbt_query_response: packet_nbt_query_response - if collect: packet_collect - if entity_teleport: packet_entity_teleport - if set_ticking_state: packet_set_ticking_state - if step_tick: packet_step_tick - if transfer: packet_common_transfer - if advancements: packet_advancements - if entity_update_attributes: packet_entity_update_attributes - if entity_effect: packet_entity_effect - if declare_recipes: packet_declare_recipes - if tags: packet_tags - if set_projectile_power: packet_set_projectile_power - if custom_report_details: packet_common_custom_report_details - if server_links: packet_common_server_links - -^play.toServer.types: - # MC: ServerboundAcceptTeleportationPacket - packet_teleport_confirm: - teleportId: varint - # MC: ServerboundBlockEntityTagQueryPacket - packet_query_block_nbt: - transactionId: varint - location: position - # MC: ServerboundSelectBundleItemPacket - packet_select_bundle_item: - slotId: varint - selectedItemIndex: varint - # MC: ServerboundChangeDifficultyPacket - packet_set_difficulty: - newDifficulty: u8 - # MC: ServerboundChatAckPacket - packet_message_acknowledgement: - count: varint - # MC: ServerboundChatCommandPacket - packet_chat_command: - command: string - # MC: ServerboundChatCommandSignedPacket - packet_chat_command_signed: - command: string - timestamp: i64 - salt: i64 - argumentSignatures: []varint - argumentName: string - signature: [ - "buffer", - { - "count": 256 - } - ] - messageCount: varint - acknowledged: [ - "buffer", - { - "count": 3 - } - ] - # MC: ServerboundChatPacket - packet_chat_message: - message: string - timestamp: i64 - salt: i64 - signature?: [ - "buffer", - { - "count": 256 - } - ] - offset: varint - acknowledged: [ - "buffer", - { - "count": 3 - } - ] - # MC: ServerboundChatSessionUpdatePacket - packet_chat_session_update: - sessionUUID: UUID - expireTime: i64 - publicKey: ByteArray - signature: ByteArray - # MC: ServerboundChunkBatchReceivedPacket - packet_chunk_batch_received: - chunksPerTick: f32 - # MC: ServerboundClientCommandPacket - packet_client_command: - actionId: varint - # MC: ServerboundClientTickEndPacket - packet_tick_end: - # Empty - # MC: ServerboundClientInformationPacket - packet_settings: - locale: string - viewDistance: i8 - chatFlags: varint - chatColors: bool - skinParts: u8 - mainHand: varint - enableTextFiltering: bool - enableServerListing: bool - particleStatus: varint => - - all - - decreased - - minimal - # MC: ServerboundCommandSuggestionPacket - packet_tab_complete: - transactionId: varint - text: string - # MC: ServerboundConfigurationAcknowledgedPacket - packet_configuration_acknowledged: - # Empty - # MC: ServerboundContainerButtonClickPacket - packet_enchant_item: - windowId: ContainerID - enchantment: i8 - # MC: ServerboundContainerClickPacket - packet_window_click: - windowId: ContainerID - stateId: varint - slot: i16 - mouseButton: i8 - mode: varint - changedSlots: []varint - location: i16 - item: Slot - cursorItem: Slot - # MC: ServerboundContainerClosePacket - packet_close_window: - windowId: ContainerID - # MC: ServerboundContainerSlotStateChangedPacket - packet_set_slot_state: - slot_id: varint - window_id: ContainerID - state: bool - ## (ServerboundCookieResponsePacket is common) - # MC: ServerboundCustomPayloadPacket - packet_custom_payload: - channel: string - data: restBuffer - # MC: ServerboundDebugSampleSubscriptionPacket - packet_debug_sample_subscription: - type: varint - # MC: ServerboundEditBookPacket - packet_edit_book: - hand: varint - pages: string[]varint - title?: string - # MC: ServerboundEntityTagQuery - packet_query_entity_nbt: - transactionId: varint - entityId: varint - # MC: ServerboundInteractPacket - packet_use_entity: - target: varint - mouse: varint - x: mouse ? - if 2: f32 - default: void - y: mouse ? - if 2: f32 - default: void - z: mouse ? - if 2: f32 - default: void - hand: mouse ? - if 0: varint - if 2: varint - default: void - sneaking: bool - # MC: ServerboundJigsawGeneratePacket - packet_generate_structure: - location: position - levels: varint - keepJigsaws: bool - # MC: ServerboundKeepAlivePacket - packet_keep_alive: - keepAliveId: i64 - # MC: ServerboundLockDifficultyPacket - packet_lock_difficulty: - locked: bool - - MovementFlags: ["bitflags", { - "type": "u8", - "flags": ["onGround", "hasHorizontalCollision"] - }] - # MC: ServerboundMovePlayerPacket.Pos - packet_position: - x: f64 - y: f64 - z: f64 - flags: MovementFlags - # MC: ServerboundMovePlayerPacket.PosRot - packet_position_look: - x: f64 - y: f64 - z: f64 - yaw: f32 - pitch: f32 - flags: MovementFlags - # MC: ServerboundMovePlayerPacket.Rot - packet_look: - yaw: f32 - pitch: f32 - flags: MovementFlags - # MC: ServerboundMovePlayerPacket.StatusOnly - packet_flying: - flags: MovementFlags - # MC: ServerboundMoveVehiclePacket - packet_vehicle_move: - x: f64 - y: f64 - z: f64 - yaw: f32 - pitch: f32 - # MC: ServerboundPaddleBoatPacket - packet_steer_boat: - leftPaddle: bool - rightPaddle: bool - # MC: ServerboundPickItemPacket - packet_pick_item: - slot: varint - # MC: ServerboundPingRequestPacket - packet_ping_request: - id: i64 - # MC: ServerboundPlaceRecipePacket - packet_craft_recipe_request: - windowId: ContainerID - recipeId: varint - makeAll: bool - # MC: ServerboundPlayerAbilitiesPacket - packet_abilities: - flags: i8 - # MC: ServerboundPlayerActionPacket - packet_block_dig: - status: varint - location: position - face: i8 - sequence: varint - # MC: ServerboundPlayerCommandPacket - packet_entity_action: - entityId: varint - actionId: varint - jumpBoost: varint - # MC: ServerboundPlayerInputPacket - # previously: packet_steer_vehicle - packet_player_input: - ## client/net/minecraft/world/entity/player/Input.java - inputs: ["bitflags", { - "type": "u8", - "flags": ["forward", "backward", "left", "right", "jump", "shift", "sprint"] - }] - # MC: ServerboundPongPacket - packet_pong: - id: i32 - # MC: ServerboundRecipeBookChangeSettingsPacket - packet_recipe_book: - bookId: varint - bookOpen: bool - filterActive: bool - # MC: ServerboundRecipeBookSeenRecipePacket - packet_displayed_recipe: - recipeId: varint - # MC: ServerboundRenameItemPacket - packet_name_item: - name: string - # MC: ServerboundResourcePackPacket - packet_resource_pack_receive: - uuid: UUID - result: varint - # MC: ServerboundSeenAdvancementsPacket - packet_advancement_tab: - action: varint - tabId: action ? - if 0: string - if 1: void - # MC: ServerboundSelectTradePacket - packet_select_trade: - slot: varint - # MC: ServerboundSetBeaconPacket - packet_set_beacon_effect: - primary_effect?: varint - secondary_effect?: varint - # MC: ServerboundSetCarriedItemPacket - packet_held_item_slot: - slotId: i16 - # MC: ServerboundSetCommandBlockPacket - packet_update_command_block: - location: position - command: string - mode: varint - flags: u8 - # MC: ServerboundSetCommandMinecartPacket - packet_update_command_block_minecart: - entityId: varint - command: string - track_output: bool - # MC: ServerboundSetCreativeModeSlotPacket - packet_set_creative_slot: - slot: i16 - item: Slot - # MC: ServerboundSetJigsawBlockPacket - packet_update_jigsaw_block: - location: position - name: string - target: string - pool: string - finalState: string - jointType: string - selection_priority: varint - placement_priority: varint - # MC: ServerboundSetStructureBlockPacket - packet_update_structure_block: - location: position - action: varint - mode: varint - name: string - offset_x: i8 - offset_y: i8 - offset_z: i8 - size_x: i8 - size_y: i8 - size_z: i8 - mirror: varint - rotation: varint - metadata: string - integrity: f32 - seed: varint - flags: u8 - # MC: ServerboundSignUpdatePacket - packet_update_sign: - location: position - isFrontText: bool - text1: string - text2: string - text3: string - text4: string - # MC: ServerboundSwingPacket - packet_arm_animation: - hand: varint - # MC: ServerboundTeleportToEntityPacket - packet_spectate: - target: UUID - # MC: ServerboundUseItemOnPacket - packet_block_place: - hand: varint - location: position - direction: varint - cursorX: f32 - cursorY: f32 - cursorZ: f32 - insideBlock: bool - worldBorderHit: bool - sequence: varint - # MC: ServerboundUseItemPacket - packet_use_item: - hand: varint - sequence: varint - rotation: vec2f - - packet: - name: varint => - - teleport_confirm - - query_block_nbt - - select_bundle_item - - set_difficulty - - message_acknowledgement - - chat_command - - chat_command_signed - - chat_message - - chat_session_update - - chunk_batch_received - - client_command - - tick_end - - settings - - tab_complete - - configuration_acknowledged - # Maybe rename enchant_item if it is used for other things too - - enchant_item - - window_click - - close_window - - set_slot_state - - cookie_response - - custom_payload - - debug_sample_subscription - - edit_book - - query_entity_nbt - - use_entity - - generate_structure - - keep_alive - - lock_difficulty - - position - - position_look - - look - - flying - - vehicle_move - - steer_boat - - pick_item - - ping_request - - craft_recipe_request - - abilities - - block_dig - - entity_action - - player_input - - pong - - recipe_book - - displayed_recipe - - name_item - - resource_pack_receive - - advancement_tab - - select_trade - - set_beacon_effect - - held_item_slot - - update_command_block - - update_command_block_minecart - - set_creative_slot - - update_jigsaw_block - - update_structure_block - - update_sign - - arm_animation - - spectate - - block_place - - use_item - params: name ? - if teleport_confirm: packet_teleport_confirm - if query_block_nbt: packet_query_block_nbt - if select_bundle_item: packet_select_bundle_item - if set_difficulty: packet_set_difficulty - if message_acknowledgement: packet_message_acknowledgement - if chat_command: packet_chat_command - if chat_command_signed: packet_chat_command_signed - if chat_message: packet_chat_message - if chat_session_update: packet_chat_session_update - if chunk_batch_received: packet_chunk_batch_received - if client_command: packet_client_command - if tick_end: packet_tick_end - if settings: packet_settings - if tab_complete: packet_tab_complete - if configuration_acknowledged: packet_configuration_acknowledged - if enchant_item: packet_enchant_item - if window_click: packet_window_click - if close_window: packet_close_window - if set_slot_state: packet_set_slot_state - if cookie_response: packet_common_cookie_response - if custom_payload: packet_custom_payload - if edit_book: packet_edit_book - if query_entity_nbt: packet_query_entity_nbt - if use_entity: packet_use_entity - if generate_structure: packet_generate_structure - if keep_alive: packet_keep_alive - if lock_difficulty: packet_lock_difficulty - if position: packet_position - if position_look: packet_position_look - if look: packet_look - if flying: packet_flying - if vehicle_move: packet_vehicle_move - if steer_boat: packet_steer_boat - if pick_item: packet_pick_item - if ping_request: packet_ping_request - if craft_recipe_request: packet_craft_recipe_request - if abilities: packet_abilities - if block_dig: packet_block_dig - if entity_action: packet_entity_action - if player_input: packet_player_input - if pong: packet_pong - if recipe_book: packet_recipe_book - if displayed_recipe: packet_displayed_recipe - if name_item: packet_name_item - if resource_pack_receive: packet_resource_pack_receive - if advancement_tab: packet_advancement_tab - if select_trade: packet_select_trade - if set_beacon_effect: packet_set_beacon_effect - if held_item_slot: packet_held_item_slot - if update_command_block: packet_update_command_block - if update_command_block_minecart: packet_update_command_block_minecart - if set_creative_slot: packet_set_creative_slot - if update_jigsaw_block: packet_update_jigsaw_block - if update_structure_block: packet_update_structure_block - if update_sign: packet_update_sign - if arm_animation: packet_arm_animation - if spectate: packet_spectate - if block_place: packet_block_place - if use_item: packet_use_item +!version: 1.21.3 +!StartDocs: true + +^types: + varint: native + varlong: native + optvarint: varint + pstring: native + buffer: native + u8: native + u16: native + u32: native + u64: native + i8: native + i16: native + i32: native + i64: native + bool: native + f32: native + f64: native + UUID: native + option: native + entityMetadataLoop: native + topBitSetTerminatedArray: native + bitfield: native + bitflags: native + container: native + switch: native + void: native + array: native + restBuffer: native + anonymousNbt: native + anonOptionalNbt: native + registryEntryHolder: native + registryEntryHolderSet: native + ByteArray: ["buffer", { "countType": "varint" }] + string: ["pstring", { "countType": "varint" }] + vec2f: + x: f32 + y: f32 + vec3f: + x: f32 + y: f32 + z: f32 + vec4f: + x: f32 + y: f32 + z: f32 + w: f32 + vec3f64: + x: f64 + y: f64 + z: f64 + IDSet: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "ids", type: "varint" } + }] + ContainerID: varint + SlotComponentType: varint => + - custom_data + - max_stack_size + - max_damage + - damage + - unbreakable + - custom_name + - item_name + - item_model + - lore + - rarity + - enchantments + - can_place_on + - can_break + - attribute_modifiers + - custom_model_data + - hide_additional_tooltip + - hide_tooltip + - repair_cost + - creative_slot_lock + - enchantment_glint_override + - intangible_projectile + - food + - consumable + - use_remainder + - use_cooldown + - damage_resistant + - tool + - enchantable + - equippable + - repairable + - glider + - tooltip_style + - death_protection + - stored_enchantments + - dyed_color + - map_color + - map_id + - map_decorations + - map_post_processing + - charged_projectiles + - bundle_contents + - potion_contents + - suspicious_stew_effects + - writable_book_content + - written_book_content + - trim + - debug_stick_state + - entity_data + - bucket_entity_data + - block_entity_data + - instrument + - ominous_bottle_amplifier + - jukebox_playable + - recipes + - lodestone_tracker + - firework_explosion + - fireworks + - profile + - note_block_sound + - banner_patterns + - base_color + - pot_decorations + - container + - block_state + - bees + - lock + - container_loot + + # Instead of sending NBT for items over the network, Minecraft since 1.20.5 sends a + # list of components that make up the item. This saves bandwidth by not encoding tag names. + SlotComponent: + type: SlotComponentType + ## Ref: client/net/minecraft/core/component/DataComponents.java + data: type ? + ## TODO: look into how nbt works here + if custom_data: anonymousNbt + if max_stack_size: varint + if max_damage: varint + if damage: varint + if unbreakable: bool + if custom_name: anonymousNbt + if item_name: anonymousNbt + if item_model: string + if lore: anonOptionalNbt[]varint + if rarity: varint => + - common + - uncommon + - rare + - epic + if enchantments: + enchantments: []varint + id: varint + level: varint + showTooltip: bool + if can_place_on or can_break: + predicates: ItemBlockPredicate[]varint + showTooltip: bool + if attribute_modifiers: + attributes: []varint + typeId: varint + name: string + value: f64 + operation: varint => + - add + - multiply_base + - multiply_total + slot: varint => + - any + - main_hand + - off_hand + - hand + - feet + - legs + - chest + - head + - armor + - body + showTooltip: bool + if custom_model_data: varint + if hide_additional_tooltip: void + if hide_tooltip: void + if repair_cost: varint + if creative_slot_lock: void + if enchantment_glint_override: bool + if intangible_projectile: void + if food: + nutrition: varint + # How much saturation will be given after consuming the item. + saturationModifier: f32 + # Whether the item can always be eaten, even at full hunger. + canAlwaysEat: bool + if consumable: + consume_seconds: f32 + animation: varint => + - none + - eat + - drink + - block + - bow + - spear + - crossbow + - spyglass + - toot_horn + - brush + sound: ["registryEntryHolder", { + "baseName": "soundId", + "otherwise": { name: "data", type: "ItemSoundEvent" } + }] + makes_particles: bool + effects: ItemConsumeEffect[]varint + if use_remainder: Slot + if use_cooldown: + seconds: f32 + cooldownGroup?: string + if damage_resistant: string + if tool: + rules: []varint + blocks: IDSet + # The speed at which the tool breaks this rules' blocks. + speed?: f32 + # Whether items should drop only if this is the correct tool. + correctDropForBlocks?: bool + # The mining speed in case none of the previous rule were matched. + defaultMiningSpeed: f32 + damagePerBlock: varint + # Enchantment cost up to which the item can be enchanted + if enchantable: varint + if equippable: + slot: varint => + - main_hand + - off_hand + - feet + - legs + - chest + - head + - body + sound: ["registryEntryHolder", { + "baseName": "soundId", + "otherwise": { name: "data", type: "ItemSoundEvent" } + }] + model?: string + cameraOverlay?: string + allowedEntities?: IDSet + dispensable: bool + swappable: bool + damageable: bool + if repairable: + items: IDSet + if tooltip_style: string + if death_protection: + effects: ItemConsumeEffect[]varint + if stored_enchantments: + enchantments: []varint + # The ID of the enchantment in the enchantment registry. + id: varint + level: varint + # Whether the list of enchantments should be shown on the item's tooltip. + showInTooltip: bool + if dyed_color: + color: varint + showTooltip: bool + if map_color: varint + if map_id: varint + if map_decorations: anonOptionalNbt + if map_post_processing: varint + if charged_projectiles: + projectiles: Slot[]varint + if bundle_contents: + contents: Slot[]varint + if potion_contents: + # True if this potion has an ID in the potion registry--it has the default effects associated with the potion type. + potionId?: varint + # The RGB components of the color, encoded as an integer. + customColor?: varint + customEffects: ItemPotionEffect[]varint + customName: string + if suspicious_stew_effects: + effects: []varint + # The ID of the effect in the potion effect type registry. + effect: varint + # The duration of the effect. + duration: varint + if writable_book_content: + # Max 100 pages + pages: ItemBookPage[]varint + if written_book_content: + # The raw title of the book, up to 32 characters. + rawTitle: string + filteredTitle?: string + author: string + generation: varint + # Max 100 pages + pages: ItemBookPage[]varint + # Whether entity selectors have already been resolved. + resolved: bool + # Name Type Description + # Trim Material Type VarInt Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents a trim material, with the necessary data following. + # Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1. + # Asset Name Optional String See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Ingredient Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Item Model Index Optional Float See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Number of Overrides Optional VarInt See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Override Armor Material Type Optional Array VarInt Enum See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Overriden Asset Name String See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Description Optional Text Component See Armor Trim Material Registry. Only present if Trim Material Type is 0. + # Trim Pattern Type VarInt Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents a trim pattern, with the necessary data following. + # Anything else - References a trim pattern in its registry, by the ID of Trim Pattern Type - 1. + # Asset Name Optional String See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. + # Template Item Optional VarInt See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. + # Description Optional Text Component See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. + # Decal Optional Boolean See Armor Trim Pattern Registry. Only present if Trim Pattern Type is 0. + # Show In Tooltip Boolean Whether the trim information should be shown on the item's tooltip. + if trim: + # Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents a trim material, with the necessary data following. + # Anything else - References a trim material in its registry, by the ID of Trim Material Type - 1. + materialType: varint + _: materialType ? + if 0: + assetName: string + ingredientId: varint + itemModelIndex: f32 + numberOfOverrides: optvarint + override: []varint + armorMaterialType: varint + overridenAssetName: string + description: string + trimPatternType: varint + _: trimPatternType ? + if 0: + assetName: string + templateItem: varint + description: string + decal: bool + showInTooltip: bool + if debug_stick_state: anonymousNbt + if entity_data: anonymousNbt + if bucket_entity_data: anonymousNbt + if block_entity_data: anonymousNbt + # Name Type Description + # Instrument Type VarInt Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents an instrument, with the necessary data following. + # Anything else - References an instrument in its registry, by the ID of Instrument Type - 1. + # Sound Event Optional Sound Event The sound to be played. Only present if Instrument Type is 0. + # Use duration Optional Float The maximum range of the sound. Only present if Instrument Type is 0. + # Range Optional Float The range of the instrument. Only present if Instrument Type is 0. + if instrument: + instrumentType: varint + _: instrumentType ? + if 0: + soundEvent: string + useDuration: f32 + range: f32 + if ominous_bottle_amplifier: varint + # Name Type Description + # Direct Mode Boolean Whether the jukebox song is specified directly, or just referenced by name. + # Jukebox Song Name Optional Identifier The name of the jukebox song in its respective registry. Only present if Direct Mode is false. + # Jukebox Song Type Optional VarInt Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents a jukebox song, with the necessary data following. + # Anything else - References a jukebox song in its registry, by the ID of Jukebox Song Type - 1. + # Only present if Direct Mode is true. + # Sound Event Optional Sound Event The sound to be played. Only present if Direct Mode is true and Jukebox Song Type is 0. + # Description Optional Text Component The description shown in the item lore. Only present if Direct Mode is true and Jukebox Song Type is 0. + # Duration Optional Float The duration the songs should play for, in seconds. Only present if Direct Mode is true and Jukebox Song Type is 0. + # Output Optional VarInt The output strength given by a comparator. Between 0 and 15. Only present if Direct Mode is true and Jukebox Song Type is 0. + # Show In Tooltip Boolean Whether the song should be shown on the item's tooltip. + if jukebox_playable: + directMode: bool + _: directMode ? + if true: + jukeboxSongName: string + jukeboxSongType: varint + _: jukeboxSongType ? + if 0: + soundEvent: + soundEventType: varint + _: soundEventType ? + if 0: + soundName: string + fixedRange?: f32 + description: anonymousNbt + duration: f32 + output: varint + if false: + songLocation: string + showInTooltip: bool + if recipes: anonymousNbt + if lodestone_tracker: + # Specified if this lodestone points to a position; otherwise it spins randomly. + globalPosition?: + dimension: string + # The position the compass points to. Only present if Has Global Position is true. + position: position + # Whether the component is removed when the associated lodestone is broken. + tracked: bool + if firework_explosion: ItemFireworkExplosion + if fireworks: + flightDuration: varint + explosions: ItemFireworkExplosion[]varint + if profile: + # If the profile has a name, max 16 characters. + name?: string + uuid?: UUID + properties: []varint + # Max 64 characters + property: string + value: string + # Max 1024 characters + signature?: string + if note_block_sound: string + # Name Type Description + # Number of Layers VarInt Number of elements in the following array. + # Layer Pattern Type Array VarInt Identifier used to determine the data that follows. It can be either: + # 0 - Directly represents a pattern, with the necessary data following. + # Anything else - References a pattern in its registry, by the ID of Pattern Type - 1. + # Asset ID Optional Identifier Identifier of the asset. Only present if Pattern Type is 0. + # Translation Key Optional String Only present if Pattern Type is 0. + # Color Dye Color See Dye Color. + if banner_patterns: + layers: []varint + patternType: varint + _: patternType ? + if 0: + assetId: string + translationKey: string + color: varint + if base_color: varint + if pot_decorations: + # The ID of the items in the item registry. + decorations: varint[]varint + if container: + contents: Slot[]varint + # Name Type Description + # Number of Properties VarInt Number of elements in the following array. + # Property Name Array String + # Value String + if block_state: + properties: []varint + property: string + value: string + # Name Type Description + # Number of Bees VarInt Number of elements in the following array. + # Bee Entity Data Array NBT + # Ticks In Hive VarInt + # Min Ticks In Hive VarInt + if bees: + bees: []varint + # Custom data for the entity, always a Compound Tag. Same structure as the minecraft:custom_data component. + nbtData: anonymousNbt + ticksInHive: varint + minTicksInHive: varint + if lock: anonymousNbt + if container_loot: anonymousNbt + + # TODO: add to ClientboundExplodePacket and ClientboundSoundEntityPacket and ClientboundSoundPacket (and maybe other) packet which also use HolderSet + ItemSoundEvent: + soundName: string + fixedRange?: f32 + + ItemFireworkExplosion: + shape: varint => + - small_ball + - large_ball + - star + - creeper + - burst + # The RGB components of the color, encoded as an integer. + colors: i32[]varint + # The RGB components of the color, encoded as an integer. + fadeColors: i32[]varint + # Whether the firework has a trail. + hasTrail: bool + # Whether the firework has a twinkle effect. + hasTwinkle: bool + + ItemEffectDetail: + amplifier: varint + duration: varint + ambient: bool + showParticles: bool + showIcon: bool + hiddenEffect?: ItemEffectDetail + + ItemPotionEffect: + id: varint + details: ItemEffectDetail + + ItemBlockProperty: + # Name of the block state property. + name: string + # Whether this is an exact value match, as opposed to ranged. + isExactMatch: bool + # Value of the block state property. Only present in exact match mode. + exactValue?: string + # Minimum value of the block state property range. Only present in ranged match mode. + minValue?: string + # Maximum value of the block state property range. Only present in ranged match mode. + maxValue?: string + + ItemBlockPredicate: + blockSet?: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "blockIds", type: "varint" } + }] + properties?: ItemBlockProperty[]varint + nbt: anonOptionalNbt + + ItemBookPage: + # The raw text of the page. TextComponent, max 1024 characters. + content: string + filteredContent?: string + + ItemConsumeEffect: # 1.21.3 + type: varint => + - apply_effects + - remove_effects + - clear_all_effects + - teleport_randomly + - play_sound + _: type ? + if apply_effects: + effects: ItemPotionEffect[]varint + probability: f32 + if remove_effects: + effects: IDSet + if clear_all_effects: void + if teleport_randomly: + diameter: f32 + if play_sound: + sound: ["registryEntryHolder", { + "baseName": "soundId", + "otherwise": { name: "data", type: "ItemSoundEvent" } + }] + + Slot: + itemCount: varint + _: itemCount ? + if 0: void + default: + itemId: varint + # https://wiki.vg/Slot_Data#Structured_components + addedComponentCount: varint + removedComponentCount: varint + components: SlotComponent[]$addedComponentCount + removeComponents: []$removedComponentCount + type: SlotComponentType + + Particle: + # See client/net/minecraft/core/particles/ParticleTypes.java + type: varint => + - angry_villager + - block + - block_marker + - bubble + - cloud + - crit + - damage_indicator + - dragon_breath + - dripping_lava + - falling_lava + - landing_lava + - dripping_water + - falling_water + - dust + - dust_color_transition + - effect + - elder_guardian + - enchanted_hit + - enchant + - end_rod + - entity_effect + - explosion_emitter + - explosion + - gust + - small_gust + - gust_emitter_large + - gust_emitter_small + - sonic_boom + - falling_dust + - firework + - fishing + - flame + - infested + - cherry_leaves + - sculk_soul + - sculk_charge + - sculk_charge_pop + - soul_fire_flame + - soul + - flash + - happy_villager + - composter + - heart + - instant_effect + - item + - vibration + - trail + - item_slime + - item_cobweb + - item_snowball + - large_smoke + - lava + - mycelium + - note + - poof + - portal + - rain + - smoke + - white_smoke + - sneeze + - spit + - squid_ink + - sweep_attack + - totem_of_undying + - underwater + - splash + - witch + - bubble_pop + - current_down + - bubble_column_up + - nautilus + - dolphin + - campfire_cosy_smoke + - campfire_signal_smoke + - dripping_honey + - falling_honey + - landing_honey + - falling_nectar + - falling_spore_blossom + - ash + - crimson_spore + - warped_spore + - spore_blossom_air + - dripping_obsidian_tear + - falling_obsidian_tear + - landing_obsidian_tear + - reverse_portal + - white_ash + - small_flame + - snowflake + - dripping_dripstone_lava + - falling_dripstone_lava + - dripping_dripstone_water + - falling_dripstone_water + - glow_squid_ink + - glow + - wax_on + - wax_off + - electric_spark + - scrape + - shriek + - egg_crack + - dust_plume + - trial_spawner_detected_player + - trial_spawner_detected_player_ominous + - vault_connection + - dust_pillar + - ominous_spawning + - raid_omen + - trial_omen + - block_crumble + ## ## Tips for reviewing particle data (as of 1.20.5) + ## Inside the registry code, each particle can have an associated "options" type and + ## each options type can add additional data to be encoded. + ## For example, this line + ## public static final ParticleType BLOCK = register("block", false, BlockParticleOption::codec, BlockParticleOption::streamCodec); + ## will read the stream codec from BlockParticleOption.java's streamCodec member; then we see + ## return ByteBufCodecs.idMapper(Block.BLOCK_STATE_REGISTRY).map(var1 -> new BlockParticleOption(var0, var1), var0x -> var0x.state); + ## this encodes with the ByteBufCodecs.idMapper function. Inside this function we find + ## public void encode(ByteBuf var1x, T var2) { + ## int var3 = var1.applyAsInt(var2); + ## VarInt.write(var1x, var3); + ## } + ## which as we can see writes the varint to the buffer. + ## If you want to see all the serializers try regexp searching "StreamCodec.*Particle" + data: type ? + if block or block_marker or falling_dust or dust_pillar or block_crumble: varint + if dust: + red: f32 + green: f32 + blue: f32 + scale: f32 + if dust_color_transition: + fromRed: f32 + fromGreen: f32 + fromBlue: f32 + scale: f32 + toRed: f32 + toGreen: f32 + toBlue: f32 + if entity_effect: i32 + if item: Slot + if sculk_charge: f32 + if shriek: varint + if vibration: + positionType: varint => + - block + - entity + position: positionType ? + if block: position + if entity: + entityId: varint + entityEyeHeight: f32 + ticks: varint + if trail: + target: vec3f64 + color: u8 + ingredient: Slot[]varint + position: [ + "bitfield", + [ + { + "name": "x", + "size": 26, + "signed": true + }, + { + "name": "z", + "size": 26, + "signed": true + }, + { + "name": "y", + "size": 12, + "signed": true + } + ] + ] + soundSource: varint => + 0: master + 1: music + 2: record + 3: weather + 4: block + 5: hostile + 6: neutral + 7: player + 8: ambient + 9: voice + packedChunkPos: + z: i32 + x: i32 + previousMessages: []varint + id: varint + signature: id ? + if 0: [ + "buffer", + { + "count": 256 + } + ] + default: void + entityMetadataEntry: + key: u8 + type: varint => + - byte + - int + - long + - float + - string + - component + - optional_component + - item_stack + - boolean + - rotations + - block_pos + - optional_block_pos + - direction + - optional_uuid + - block_state + - optional_block_state + - compound_tag + - particle + - particles + - villager_data + - optional_unsigned_int + - pose + - cat_variant + - wolf_variant + - frog_variant + - optional_global_pos + - painting_variant + - sniffer_state + - armadillo_state + - vector3 + - quaternion + value: type ? + if byte: i8 + if int: varint + if long: varlong + if float: f32 + if string: string + if component: anonymousNbt + if optional_component: ["option", "anonymousNbt"] + if item_stack: Slot + if boolean: bool + if rotations: + pitch: f32 + yaw: f32 + roll: f32 + if block_pos: position + if optional_block_pos: ["option", "position"] + if direction: varint + if optional_uuid: ["option", "UUID"] + if block_state: varint + if optional_block_state: optvarint + if compound_tag: anonymousNbt + if particle: Particle + if particles: Particle[]varint + if villager_data: + villagerType: varint + villagerProfession: varint + level: varint + if optional_unsigned_int: optvarint + if pose: varint + if cat_variant: varint + if wolf_variant: ["registryEntryHolder", { + "baseName": "variantId", + "otherwise": { name: "variantData", type: "EntityMetadataWolfVariant" } + }] + if frog_variant: varint + if optional_global_pos: ["option", "string"] + if painting_variant: ["registryEntryHolder", { + "baseName": "variantId", + "otherwise": { name: "variantData", type: "EntityMetadataPaintingVariant" } + }] + if sniffer_state: varint + if armadillo_state: varint + if vector3: vec3f + if quaternion: vec4f + EntityMetadataPaintingVariant: + width: i32 + height: i32 + assetId: string + title?: anonymousNbt + author?: anonymousNbt + EntityMetadataWolfVariant: + wildTexture: string + tameTexture: string + angryTexture: string + biome: IDSet + + entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }] + tags: []varint + tagName: string + entries: varint[]varint + chunkBlockEntity: + _: [ + "bitfield", + [ + { + "name": "x", + "size": 4, + "signed": false + }, + { + "name": "z", + "size": 4, + "signed": false + } + ] + ] + y: i16 + type: varint + nbtData: anonOptionalNbt + chat_session?: + uuid: UUID + publicKey: + expireTime: i64 + keyBytes: [ + "buffer", + { + "countType": "varint" + } + ] + keySignature: [ + "buffer", + { + "countType": "varint" + } + ] + game_profile: + name: string + properties: []varint + key: string + value: string + signature?: string + command_node: + flags: [ + "bitfield", + [ + { + "name": "unused", + "size": 3, + "signed": false + }, + { + "name": "has_custom_suggestions", + "size": 1, + "signed": false + }, + { + "name": "has_redirect_node", + "size": 1, + "signed": false + }, + { + "name": "has_command", + "size": 1, + "signed": false + }, + { + "name": "command_node_type", + "size": 2, + "signed": false + } + ] + ] + children: varint[]varint + redirectNode: flags/has_redirect_node ? + if 1: varint + default: void + extraNodeData: flags/command_node_type ? + if 0: void + if 1: + name: string + if 2: + name: string + parser: varint => + - brigadier:bool + - brigadier:float + - brigadier:double + - brigadier:integer + - brigadier:long + - brigadier:string + - minecraft:entity + - minecraft:game_profile + - minecraft:block_pos + - minecraft:column_pos + - minecraft:vec3 + - minecraft:vec2 + - minecraft:block_state + - minecraft:block_predicate + - minecraft:item_stack + - minecraft:item_predicate + - minecraft:color + - minecraft:component + - minecraft:style + - minecraft:message + - minecraft:nbt + - minecraft:nbt_tag + - minecraft:nbt_path + - minecraft:objective + - minecraft:objective_criteria + - minecraft:operation + - minecraft:particle + - minecraft:angle + - minecraft:rotation + - minecraft:scoreboard_slot + - minecraft:score_holder + - minecraft:swizzle + - minecraft:team + - minecraft:item_slot + - minecraft:item_slots # 1.20.5 + - minecraft:resource_location + - minecraft:function + - minecraft:entity_anchor + - minecraft:int_range + - minecraft:float_range + - minecraft:dimension + - minecraft:gamemode + - minecraft:time + - minecraft:resource_or_tag + - minecraft:resource_or_tag_key + - minecraft:resource + - minecraft:resource_key + - minecraft:template_mirror + - minecraft:template_rotation + - minecraft:heightmap + - minecraft:loot_table # 1.20.5 + - minecraft:loot_predicate # 1.20.5 + - minecraft:loot_modifier # 1.20.5 + - minecraft:uuid + properties: parser ? + if brigadier:bool: void + if brigadier:float: + flags: [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "max_present", + "size": 1, + "signed": false + }, + { + "name": "min_present", + "size": 1, + "signed": false + } + ] + ] + min: flags/min_present ? + if 1: f32 + default: void + max: flags/max_present ? + if 1: f32 + default: void + if brigadier:double: + flags: [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "max_present", + "size": 1, + "signed": false + }, + { + "name": "min_present", + "size": 1, + "signed": false + } + ] + ] + min: flags/min_present ? + if 1: f64 + default: void + max: flags/max_present ? + if 1: f64 + default: void + if brigadier:integer: + flags: [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "max_present", + "size": 1, + "signed": false + }, + { + "name": "min_present", + "size": 1, + "signed": false + } + ] + ] + min: flags/min_present ? + if 1: i32 + default: void + max: flags/max_present ? + if 1: i32 + default: void + if brigadier:long: + flags: [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "max_present", + "size": 1, + "signed": false + }, + { + "name": "min_present", + "size": 1, + "signed": false + } + ] + ] + min: flags/min_present ? + if 1: i64 + default: void + max: flags/max_present ? + if 1: i64 + default: void + if brigadier:string: varint => + 0: SINGLE_WORD + 1: QUOTABLE_PHRASE + 2: GREEDY_PHRASE + if minecraft:entity: [ + "bitfield", + [ + { + "name": "unused", + "size": 6, + "signed": false + }, + { + "name": "onlyAllowPlayers", + "size": 1, + "signed": false + }, + { + "name": "onlyAllowEntities", + "size": 1, + "signed": false + } + ] + ] + if minecraft:game_profile: void + if minecraft:block_pos: void + if minecraft:column_pos: void + if minecraft:vec3: void + if minecraft:vec2: void + if minecraft:block_state: void + if minecraft:block_predicate: void + if minecraft:item_stack: void + if minecraft:item_predicate: void + if minecraft:color: void + if minecraft:component: void + if minecraft:message: void + if minecraft:nbt: void + if minecraft:nbt_path: void + if minecraft:objective: void + if minecraft:objective_criteria: void + if minecraft:operation: void + if minecraft:particle: void + if minecraft:angle: void + if minecraft:rotation: void + if minecraft:scoreboard_slot: void + if minecraft:score_holder: [ + "bitfield", + [ + { + "name": "unused", + "size": 7, + "signed": false + }, + { + "name": "allowMultiple", + "size": 1, + "signed": false + } + ] + ] + if minecraft:swizzle: void + if minecraft:team: void + if minecraft:item_slot: void + if minecraft:resource_location: void + if minecraft:function: void + if minecraft:entity_anchor: void + if minecraft:int_range: void + if minecraft:float_range: void + if minecraft:dimension: void + if minecraft:gamemode: void + if minecraft:time: + min: i32 + if minecraft:resource_or_tag: + registry: string + if minecraft:resource_or_tag_key: + registry: string + if minecraft:resource: + registry: string + if minecraft:resource_key: + registry: string + if minecraft:template_mirror: void + if minecraft:template_rotation: void + if minecraft:heightmap: void + if minecraft:uuid: void + suggestionType: ../flags/has_custom_suggestions ? + if 1: string + default: void + # # Shared Packets + # These are packets that are shared between multiple states. + # They are defined here to avoid duplication. + # ===== + # MC: ClientboundCookieRequestPacket + packet_common_cookie_request: + cookie: string + # MC: ClientboundStoreCookiePacket + packet_common_store_cookie: + key: string + value: ByteArray + # MC: ClientboundTransferPacket + packet_common_transfer: + host: string + port: varint + # MC: ServerboundCookieResponsePacket + packet_common_cookie_response: + key: string + value: ByteArray + # MC: ServerboundSelectKnownPacks + # MC: ClientboundSelectKnownPacks + packet_common_select_known_packs: + packs: []varint + namespace: string + id: string + version: string + # MC: ClientboundCustomReportDetailsPacket + packet_common_custom_report_details: + details: []varint + key: string + value: string + # MC: ClientboundResourcePackPopPacket + packet_common_remove_resource_pack: + uuid?: UUID + # MC: ClientboundResourcePackPushPacket + packet_common_add_resource_pack: + uuid: UUID + url: string + hash: string + forced: bool + promptMessage?: anonymousNbt + + ServerLinkType: varint => + - bug_report + - community_guidelines + - support + - status + - feedback + - community + - website + - forums + - news + - announcements + # MC: ClientboundServerLinksPacket + # This packet contains a list of links that the Notchian client will display in the menu + # available from the pause menu. Link labels can be built-in or custom (i.e., any text). + packet_common_server_links: + links: []varint + hasKnownType: bool + knownType: hasKnownType ? + if true: ServerLinkType + unknownType: hasKnownType ? + if false: anonymousNbt + link: string + +^handshaking.toClient.types: + packet: + name: varint => + params: ["switch",{"compareTo":"name","fields":{}}] +^handshaking.toServer.types: + packet_set_protocol: + protocolVersion: varint + serverHost: string + serverPort: u16 + nextState: varint + packet_legacy_server_list_ping: + payload: u8 + packet: + name: varint => + 0x00: set_protocol + 0xfe: legacy_server_list_ping + params: name ? + if set_protocol: packet_set_protocol + if legacy_server_list_ping: packet_legacy_server_list_ping +^status.toClient.types: + # MC: ClientboundStatusResponsePacket + packet_server_info: + response: string + # MC: ClientboundPongResponsePacket + packet_ping: + time: i64 + packet: + name: varint => + 0x00: server_info + 0x01: ping + params: name ? + if server_info: packet_server_info + if ping: packet_ping +^status.toServer.types: + # MC: ServerboundStatusRequestPacket + packet_ping_start: + # Empty + # MC: ServerboundPingRequestPacket + packet_ping: + time: i64 + packet: + name: varint => + 0x00: ping_start + 0x01: ping + params: name ? + if ping_start: packet_ping_start + if ping: packet_ping +^login.toClient.types: + # MC: ClientboundLoginDisconnectPacket + packet_disconnect: + reason: string + # MC: ClientboundHelloPacket + packet_encryption_begin: + serverId: string + publicKey: [ + "buffer", + { + "countType": "varint" + } + ] + verifyToken: [ + "buffer", + { + "countType": "varint" + } + ] + shouldAuthenticate: bool + # MC: ClientboundLoginFinishedPacket + packet_success: + uuid: UUID + username: string + properties: []varint + name: string + value: string + signature?: string + # MC: ClientboundLoginCompressionPacket + packet_compress: + threshold: varint + # MC: ClientboundCustomQueryPacket + packet_login_plugin_request: + messageId: varint + channel: string + data: restBuffer + ## (Cookie Request is Common) ## + packet: + name: varint => + - disconnect + - encryption_begin + - success + - compress + - login_plugin_request + - cookie_request + params: name ? + if disconnect: packet_disconnect + if encryption_begin: packet_encryption_begin + if success: packet_success + if compress: packet_compress + if login_plugin_request: packet_login_plugin_request + if cookie_request: packet_common_cookie_request +^login.toServer.types: + # MC: ServerboundHelloPacket + packet_login_start: + username: string + playerUUID: UUID + # MC: ServerboundKeyPacket + packet_encryption_begin: + sharedSecret: [ + "buffer", + { + "countType": "varint" + } + ] + verifyToken: [ + "buffer", + { + "countType": "varint" + } + ] + # MC: ServerboundCustomQueryAnswerPacket + packet_login_plugin_response: + messageId: varint + data?: restBuffer + # MC: ServerboundLoginAcknowledgedPacket + packet_login_acknowledged: + # Empty + ## (Cookie Response is Common) ## + packet: + name: varint => + - login_start + - encryption_begin + - login_plugin_response + - login_acknowledged + - cookie_response + params: name ? + if login_start: packet_login_start + if encryption_begin: packet_encryption_begin + if login_plugin_response: packet_login_plugin_response + if login_acknowledged: packet_login_acknowledged + if cookie_response: packet_common_cookie_response +^configuration.toClient.types: + ## (Cookie Request is common) + # MC: ClientboundCustomPayloadPacket + packet_custom_payload: + channel: string + data: restBuffer + # MC: ClientboundDisconnectPacket + packet_disconnect: + reason: anonymousNbt + # MC: ClientboundFinishConfigurationPacket + packet_finish_configuration: + # Empty + # MC: ClientboundKeepAlivePacket + packet_keep_alive: + keepAliveId: i64 + # MC: ClientboundPingPacket + packet_ping: + id: i32 + # MC: ClientboundResetChatPacket + packet_reset_chat: + # Empty + # MC: ClientboundRegistryDataPacket + packet_registry_data: + # The server can send multiple registries + id: string + entries: []varint + key: string + value?: anonymousNbt + ## (Store cookie and Transfer are Common) ## + # MC: ClientboundUpdateEnabledFeaturesPacket + packet_feature_flags: + features: string[]varint + # MC: ClientboundUpdateTagsPacket + packet_tags: + tags: []varint + tagType: string + tags: tags + ## (Select known packs is common) + packet: + name: varint => + - cookie_request + - custom_payload + - disconnect + - finish_configuration + - keep_alive + - ping + - reset_chat + - registry_data + - remove_resource_pack + - add_resource_pack + - store_cookie + - transfer + - feature_flags + - tags + - select_known_packs + - custom_report_details + - server_links + params: name ? + if cookie_request: packet_common_cookie_request + if custom_payload: packet_custom_payload + if disconnect: packet_disconnect + if finish_configuration: packet_finish_configuration + if keep_alive: packet_keep_alive + if ping: packet_ping + if reset_chat: packet_reset_chat + if registry_data: packet_registry_data + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack + if store_cookie: packet_common_store_cookie + if transfer: packet_common_transfer + if feature_flags: packet_feature_flags + if tags: packet_tags + if select_known_packs: packet_common_select_known_packs + if custom_report_details: packet_common_custom_report_details + if server_links: packet_common_server_links +^configuration.toServer.types: + # MC: ServerboundClientInformationPacket + packet_settings: + locale: string + viewDistance: i8 + chatFlags: varint + chatColors: bool + skinParts: u8 + mainHand: varint + enableTextFiltering: bool + enableServerListing: bool + particles: varint + ## (Cookie Response is Common) ## + # MC: ServerboundCustomPayloadPacket + packet_custom_payload: + channel: string + data: restBuffer + # MC: ServerboundFinishConfigurationPacket + packet_finish_configuration: + # Empty + # MC: ServerboundKeepAlivePacket + packet_keep_alive: + keepAliveId: i64 + # MC: ServerboundPongPacket + packet_pong: + id: i32 + # MC: ServerboundResourcePackPacket + packet_resource_pack_receive: + uuid: UUID + result: varint + packet: + name: varint => + - settings + - cookie_response + - custom_payload + - finish_configuration + - keep_alive + - pong + - resource_pack_receive + - select_known_packs + - custom_report_details + - server_links + params: name ? + if settings: packet_settings + if cookie_response: packet_common_cookie_response + if custom_payload: packet_custom_payload + if finish_configuration: packet_finish_configuration + if keep_alive: packet_keep_alive + if pong: packet_pong + if resource_pack_receive: packet_resource_pack_receive + if select_known_packs: packet_common_select_known_packs + if custom_report_details: packet_common_custom_report_details + if server_links: packet_common_server_links +^play.toClient.types: + SlotDisplay: + type: varint => + - empty + - any_fuel + - item + - item_stack + - tag + - smithing_trim + - with_remainder + - composite + data: type ? + if empty or any_fuel: void + if item: varint + if item_stack: Slot + if tag: string + if simthing_trim: + base: SlotDisplay + material: SlotDisplay + pattern: SlotDisplay + if with_remainder: + input: SlotDisplay + remainder: SlotDisplay + if composite: SlotDisplay[]varint + RecipeDisplay: + type: varint => + - crafting_shapeless + - crafting_shaped + - furnace + - stonecutter + - smithing + data: type ? + if crafting_shapeless: + ingredients: SlotDisplay[]varint + result: SlotDisplay + craftingStation: SlotDisplay + if crafting_shaped: + width: varint + height: varint + ingredients: SlotDisplay[]varint + result: SlotDisplay + craftingStation: SlotDisplay + if furnace: + ingredient: SlotDisplay + fuel: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay + duration: varint + experience: f32 + if stonecutter: + ingredient: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay + if smithing: + template: SlotDisplay + base: SlotDisplay + addition: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay + # World state information for spawn and respawn packets + SpawnInfo: + dimension: varint + name: string + hashedSeed: i64 + gamemode: i8 => + - survival + - creative + - adventure + - spectator + previousGamemode: u8 + isDebug: bool + isFlat: bool + death?: + dimensionName: string + location: position + portalCooldown: varint + seaLevel: varint + + # MC: ClientboundAddEntityPacket + packet_spawn_entity: + entityId: varint + objectUUID: UUID + type: varint + x: f64 + y: f64 + z: f64 + pitch: i8 + yaw: i8 + headPitch: i8 + objectData: varint + velocityX: i16 + velocityY: i16 + velocityZ: i16 + # MC: ClientboundAddExperienceOrbPacket + packet_spawn_entity_experience_orb: + entityId: varint + x: f64 + y: f64 + z: f64 + count: i16 + # MC: ClientboundAnimatePacket + packet_animation: + entityId: varint + animation: u8 + # MC: ClientboundAwardStatsPacket + packet_statistics: + entries: []varint + categoryId: varint + statisticId: varint + value: varint + # MC: ClientboundBlockChangedAckPacket + packet_acknowledge_player_digging: + sequenceId: varint + # MC: ClientboundBlockDestructionPacket + packet_block_break_animation: + entityId: varint + location: position + destroyStage: i8 + # MC: ClientboundBlockEntityDataPacket + packet_tile_entity_data: + location: position + action: varint + nbtData: anonOptionalNbt + # MC: ClientboundBlockEventPacket + packet_block_action: + location: position + byte1: u8 + byte2: u8 + blockId: varint + # MC: ClientboundBlockUpdatePacket + packet_block_change: + location: position + type: varint + # MC: ClientboundBossEventPacket + packet_boss_bar: + entityUUID: UUID + action: varint + title: action ? + if 0: anonymousNbt + if 3: anonymousNbt + default: void + health: action ? + if 0: f32 + if 2: f32 + default: void + color: action ? + if 0: varint + if 4: varint + default: void + dividers: action ? + if 0: varint + if 4: varint + default: void + flags: action ? + if 0: u8 + if 5: u8 + default: void + # MC: ClientboundChangeDifficultyPacket + packet_difficulty: + difficulty: u8 + difficultyLocked: bool + # MC: ClientboundChunkBatchFinishedPacket + packet_chunk_batch_finished: + batchSize: varint + # MC: ClientboundChunkBatchStartPacket + packet_chunk_batch_start: + # Empty + # MC: ClientboundChunksBiomesPacket + packet_chunk_biomes: + biomes: []varint + position: packedChunkPos + data: ByteArray + # MC: ClientboundClearTitlesPacket + packet_clear_titles: + reset: bool + # MC: ClientboundCommandSuggestionsPacket + packet_tab_complete: + transactionId: varint + start: varint + length: varint + matches: []varint + match: string + tooltip?: anonymousNbt + # MC: ClientboundCommandsPacket + packet_declare_commands: + nodes: command_node[]varint + rootIndex: varint + # MC: ClientboundContainerClosePacket + packet_close_window: + windowId: ContainerID + # MC: ClientboundContainerSetContentPacket + packet_window_items: + windowId: ContainerID + stateId: varint + items: Slot[]varint + carriedItem: Slot + # MC: ClientboundContainerSetDataPacket + packet_craft_progress_bar: + windowId: ContainerID + property: i16 + value: i16 + # MC: ClientboundContainerSetSlotPacket + packet_set_slot: + windowId: ContainerID + stateId: varint + slot: i16 + item: Slot + ## (Cookie Request is Common) + # MC: ClientboundCooldownPacket + packet_set_cooldown: + # TODO: figure out what this is + cooldownGroup: string + cooldownTicks: varint + # MC: ClientboundCustomChatCompletionsPacket + packet_chat_suggestions: + action: varint + entries: string[]varint + # MC: ClientboundCustomPayloadPacket + packet_custom_payload: + channel: string + data: restBuffer + # MC: ClientboundDamageEventPacket + packet_damage_event: + entityId: varint + sourceTypeId: varint + sourceCauseId: varint + sourceDirectId: varint + sourcePosition?: vec3f64 + # MC: ClientboundDebugSamplePacket + packet_debug_sample: + sample: i64[]varint + type: varint + # MC: ClientboundDeleteChatPacket + packet_hide_message: + id: varint + signature: id ? + if 0: [ + "buffer", + { + "count": 256 + } + ] + default: void + # MC: ClientboundDisconnectPacket + packet_kick_disconnect: + reason: anonymousNbt + + ## client\net\minecraft\network\chat\ChatTypeDecoration.java + ## via client\net\minecraft\network\chat\ChatType.java + ChatTypeParameterType: varint => + - content + - sender + - target + ChatType: + translationKey: string + parameters: ChatTypeParameterType[]varint + style: anonymousNbt + ChatTypes: + # Either the extra data is retrieved from the registry (via this ID+1 if non-zero), or it's supplied inline in the chat packet + registryIndex: varint + _: registryIndex ? + if 0: + chat: ChatType + narration: ChatType + default: void + + # MC: ClientboundDisguisedChatPacket + packet_profileless_chat: + message: anonymousNbt + type: ChatTypes + name: anonymousNbt + target?: anonymousNbt + # MC: ClientboundEntityEventPacket + packet_entity_status: + entityId: i32 + entityStatus: i8 + # MC: ClientboundEntityPositionSyncPacket + packet_sync_entity_position: + entityId: varint + x: f64 + y: f64 + z: f64 + dx: f64 + dy: f64 + dz: f64 + yaw: f32 + pitch: f32 + onGround: bool + # MC: ClientboundExplodePacket + packet_explosion: + center: vec3f + playerKnockback?: vec3f + explosionParticle: Particle + soundId: varint + _: soundId ? + if 0: + soundName: string + range?: f32 + default: + + # MC: ClientboundForgetLevelChunkPacket + packet_unload_chunk: + chunkZ: i32 + chunkX: i32 + # MC: ClientboundGameEventPacket + packet_game_state_change: + reason: u8 + gameMode: f32 + # MC: ClientboundHorseScreenOpenPacket + packet_open_horse_window: + windowId: ContainerID + nbSlots: varint + entityId: i32 + # MC: ClientboundHurtAnimationPacket + packet_hurt_animation: + entityId: varint + yaw: f32 + # MC: ClientboundInitializeBorderPacket + packet_initialize_world_border: + x: f64 + z: f64 + oldDiameter: f64 + newDiameter: f64 + speed: varint + portalTeleportBoundary: varint + warningBlocks: varint + warningTime: varint + # MC: ClientboundKeepAlivePacket + packet_keep_alive: + keepAliveId: i64 + # MC: ClientboundLevelChunkWithLightPacket + packet_map_chunk: + x: i32 + z: i32 + heightmaps: anonymousNbt + chunkData: [ + "buffer", + { + "countType": "varint" + } + ] + blockEntities: chunkBlockEntity[]varint + skyLightMask: i64[]varint + blockLightMask: i64[]varint + emptySkyLightMask: i64[]varint + emptyBlockLightMask: i64[]varint + skyLight: []varint + _: u8[]varint + blockLight: []varint + _: u8[]varint + # MC: ClientboundLevelEventPacket + packet_world_event: + effectId: i32 + location: position + data: i32 + global: bool + # MC: ClientboundLevelParticlesPacket + packet_world_particles: + longDistance: bool + x: f64 + y: f64 + z: f64 + offsetX: f32 + offsetY: f32 + offsetZ: f32 + velocityOffset: f32 + amount: i32 + particle: Particle + # MC: ClientboundLightUpdatePacket + packet_update_light: + chunkX: varint + chunkZ: varint + skyLightMask: i64[]varint + blockLightMask: i64[]varint + emptySkyLightMask: i64[]varint + emptyBlockLightMask: i64[]varint + skyLight: []varint + _: u8[]varint + blockLight: []varint + _: u8[]varint + # MC: ClientboundLoginPacket + packet_login: + entityId: i32 + isHardcore: bool + worldNames: string[]varint + maxPlayers: varint + viewDistance: varint + simulationDistance: varint + reducedDebugInfo: bool + enableRespawnScreen: bool + doLimitedCrafting: bool + worldState: SpawnInfo + enforcesSecureChat: bool + # MC: ClientboundMapItemDataPacket + packet_map: + itemDamage: varint + scale: i8 + locked: bool + icons?: []varint + type: varint + x: i8 + z: i8 + direction: u8 + displayName?: anonymousNbt + columns: u8 + rows: columns ? + if 0: void + default: u8 + x: columns ? + if 0: void + default: u8 + y: columns ? + if 0: void + default: u8 + data: columns ? + if 0: void + default: [ + "buffer", + { + "countType": "varint" + } + ] + # MC: ClientboundMerchantOffersPacket + packet_trade_list: + windowId: ContainerID + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/MerchantOffer.java#L210 + trades: []varint + inputItem1: + itemId: varint + itemCount: varint + addedComponentCount: varint + components: SlotComponent[]$addedComponentCount + outputItem: Slot + inputItem2?: + itemId: varint + itemCount: varint + addedComponentCount: varint + components: SlotComponent[]$addedComponentCount + tradeDisabled: bool + nbTradeUses: i32 + maximumNbTradeUses: i32 + xp: i32 + specialPrice: i32 + priceMultiplier: f32 + demand: i32 + villagerLevel: varint + experience: varint + isRegularVillager: bool + canRestock: bool + # MC: ClientboundMoveEntityPacket.Pos + packet_rel_entity_move: + entityId: varint + dX: i16 + dY: i16 + dZ: i16 + onGround: bool + # MC: ClientboundMoveEntityPacket.PosRot + packet_entity_move_look: + entityId: varint + dX: i16 + dY: i16 + dZ: i16 + yaw: i8 + pitch: i8 + onGround: bool + # MC: ClientboundMoveMinecartPacket + packet_move_minecart: # 1.21.3 + entityId: varint + steps: []varint + position: vec3f + movement: vec3f + yaw: f32 + pitch: f32 + weight: f32 + # MC: ClientboundMoveEntityPacket.Rot + packet_entity_look: + entityId: varint + yaw: i8 + pitch: i8 + onGround: bool + # MC: ClientboundMoveVehiclePacket + packet_vehicle_move: + x: f64 + y: f64 + z: f64 + yaw: f32 + pitch: f32 + # MC: ClientboundOpenBookPacket + packet_open_book: + hand: varint + # MC: ClientboundOpenScreenPacket + packet_open_window: + windowId: varint + inventoryType: varint + windowTitle: anonymousNbt + # MC: ClientboundOpenSignEditorPacket + packet_open_sign_entity: + location: position + isFrontText: bool + # MC: ClientboundPingPacket + packet_ping: + id: i32 + # MC: ClientboundPongResponsePacket + packet_ping_response: + id: i64 + # MC: ClientboundPlaceGhostRecipePacket + packet_craft_recipe_response: + windowId: ContainerID + recipeDisplay: RecipeDisplay + # MC: ClientboundPlayerAbilitiesPacket + packet_abilities: + flags: i8 + flyingSpeed: f32 + walkingSpeed: f32 + # MC: ClientboundPlayerChatPacket + packet_player_chat: + senderUuid: UUID + index: varint + signature?: [ + "buffer", + { + "count": 256 + } + ] + plainMessage: string + timestamp: i64 + salt: i64 + previousMessages: previousMessages + unsignedChatContent?: anonymousNbt + filterType: varint + filterTypeMask: filterType ? + if 2: i64[]varint + default: void + type: ChatTypes + networkName: anonymousNbt + networkTargetName?: anonymousNbt + # MC: ClientboundPlayerCombatEndPacket + packet_end_combat_event: + duration: varint + # MC: ClientboundPlayerCombatEnterPacket + packet_enter_combat_event: + # Empty + # MC: ClientboundPlayerCombatKillPacket + packet_death_combat_event: + playerId: varint + message: anonymousNbt + # MC: ClientboundPlayerInfoRemovePacket + packet_player_remove: + players: UUID[]varint + # MC: ClientboundPlayerInfoUpdatePacket + packet_player_info: + ## ClientboundPlayerInfoUpdatePacket.java#L160 + action: ["bitflags", { + "type": "u8", + "flags": [ + "add_player", + "initialize_chat", + "update_game_mode", + "update_listed", + "update_latency", + "update_display_name", + "update_list_order" + ] + }] + data: []varint + uuid: UUID + player: ../action/add_player ? + if true: game_profile + default: void + chatSession: ../action/initialize_chat ? + if true: chat_session + default: void + gamemode: ../action/update_game_mode ? + if true: varint + default: void + listed: ../action/update_listed ? + if true: varint + default: void + latency: ../action/update_latency ? + if true: varint + default: void + displayName: ../action/update_display_name ? + if true: ["option", "anonymousNbt"] + default: void + listPriority: ../action/update_list_order ? + if true: varint + default: void + + # MC: ClientboundPlayerLookAtPacket + packet_face_player: + feet_eyes: varint + x: f64 + y: f64 + z: f64 + isEntity: bool + entityId: isEntity ? + if true: varint + default: void + entity_feet_eyes: isEntity ? + if true: varint + default: void + + # https://github.com/extremeheat/extracted_minecraft_data/blob/client1.21.2/client/net/minecraft/world/entity/Relative.java#L82 + PositionUpdateRelatives: ["bitflags", { + "type": "u32", + "flags": ["x", "y", "z", "yaw", "pitch", "dx", "dy", "dz", "yawDelta"] + }] + # MC: ClientboundPlayerPositionPacket + packet_position: + teleportId: varint + x: f64 + y: f64 + z: f64 + dx: f64 + dy: f64 + dz: f64 + yaw: f32 + pitch: f32 + flags: PositionUpdateRelatives + # MC: ClientboundPlayerRotationPacket + packet_player_rotation: + yaw: f32 + pitch: f32 + + # MC: ClientboundRecipeBookAddPacket + packet_recipe_book_add: + entries: []varint + # RecipeDisplayEntry + recipe: + displayId: varint + display: RecipeDisplay + group: optvarint + # This ID corresponds to the "recipe_book_category" registry + category: varint => + - crafting_building_blocks + - crafting_redstone + - crafting_equipment + - crafting_misc + - furnace_food + - furnace_blocks + - furnace_misc + - blast_furnace_blocks + - blast_furnace_misc + - smoker_food + - stonecutter + - smithing + - campfire + craftingRequirements?: IDSet[]varint + flags: ["bitflags", { + "type": "u8", + "flags": ["notification", "highlight"] + }] + replace: bool + # MC: ClientboundRecipeBookRemovePacket + packet_recipe_book_remove: + recipeIds: varint[]varint + # MC: ClientboundRecipeBookSettingsPacket + packet_recipe_book_settings: + craftingGuiOpen: bool + craftingFilteringCraftable: bool + smeltingGuiOpen: bool + smeltingFilteringCraftable: bool + blastGuiOpen: bool + blastFilteringCraftable: bool + smokerGuiOpen: bool + smokerFilteringCraftable: bool + # MC: ClientboundRemoveEntitiesPacket + packet_entity_destroy: + entityIds: varint[]varint + # MC: ClientboundRemoveMobEffectPacket + packet_remove_entity_effect: + entityId: varint + effectId: varint + # MC: ClientboundResetScorePacket + packet_reset_score: + entity_name: string + objective_name?: string + ## (remove_resource_pack is common) + # MC: ClientboundRespawnPacket + packet_respawn: + worldState: SpawnInfo + # Bit field: 0b1 - KEEP_ATTRIBUTE_MODIFIERS, 0b10 - KEEP_ENTITY_DATA + copyMetadata: u8 + # MC: ClientboundRotateHeadPacket + packet_entity_head_rotation: + entityId: varint + headYaw: i8 + # MC: ClientboundSectionBlocksUpdatePacket + packet_multi_block_change: + chunkCoordinates: [ "bitfield", [ + { "name": "x", "size": 22, "signed": true }, + { "name": "z", "size": 22, "signed": true }, + { "name": "y", "size": 20, "signed": true } + ]] + records: varint[]varint + # MC: ClientboundSelectAdvancementsTabPacket + packet_select_advancement_tab: + id?: string + # MC: ClientboundServerDataPacket + packet_server_data: + motd: anonymousNbt + iconBytes?: ByteArray + # MC: ClientboundSetActionBarTextPacket + packet_action_bar: + text: anonymousNbt + # MC: ClientboundSetBorderCenterPacket + packet_world_border_center: + x: f64 + z: f64 + # MC: ClientboundSetBorderLerpSizePacket + packet_world_border_lerp_size: + oldDiameter: f64 + newDiameter: f64 + speed: varint + # MC: ClientboundSetBorderSizePacket + packet_world_border_size: + diameter: f64 + # MC: ClientboundSetBorderWarningDelayPacket + packet_world_border_warning_delay: + warningTime: varint + # MC: ClientboundSetBorderWarningDistancePacket + packet_world_border_warning_reach: + warningBlocks: varint + # MC: ClientboundSetCameraPacket + packet_camera: + cameraId: varint + # MC: ClientboundSetChunkCacheCenterPacket + packet_update_view_position: + chunkX: varint + chunkZ: varint + # MC: ClientboundSetChunkCacheRadiusPacket + packet_update_view_distance: + viewDistance: varint + # MC: ClientboundSetCursorItemPacket + packet_set_cursor_item: + contents?: Slot + # MC: ClientboundSetDefaultSpawnPositionPacket + packet_spawn_position: + location: position + angle: f32 + # MC: ClientboundSetDisplayObjectivePacket + packet_scoreboard_display_objective: + position: varint + name: string + # MC: ClientboundSetEntityDataPacket + packet_entity_metadata: + entityId: varint + metadata: entityMetadata + # MC: ClientboundSetEntityLinkPacket + packet_attach_entity: + entityId: i32 + vehicleId: i32 + # MC: ClientboundSetEntityMotionPacket + packet_entity_velocity: + entityId: varint + velocityX: i16 + velocityY: i16 + velocityZ: i16 + # MC: ClientboundSetEquipmentPacket + packet_entity_equipment: + entityId: varint + equipments: [ + "topBitSetTerminatedArray", + { + "type": [ + "container", + [ + { + "name": "slot", + "type": "i8" + }, + { + "name": "item", + "type": "Slot" + } + ] + ] + } + ] + # MC: ClientboundSetExperiencePacket + packet_experience: + experienceBar: f32 + level: varint + totalExperience: varint + # MC: ClientboundSetHealthPacket + packet_update_health: + health: f32 + food: varint + foodSaturation: f32 + # MC: ClientboundSetHeldSlotPacket + packet_held_item_slot: + slot: i8 + # MC: ClientboundSetObjectivePacket + packet_scoreboard_objective: + name: string + action: i8 + displayText: action ? + if 0: anonymousNbt + if 2: anonymousNbt + default: void + type: action ? + if 0: varint + if 2: varint + default: void + number_format: action ? + if 0: [ + "option", + "varint" + ] + if 2: [ + "option", + "varint" + ] + default: void + styling: action ? + if 0: number_format ? + if 1: anonymousNbt + if 2: anonymousNbt + default: void + if 2: number_format ? + if 1: anonymousNbt + if 2: anonymousNbt + default: void + default: void + # MC: ClientboundSetPassengersPacket + packet_set_passengers: + entityId: varint + passengers: varint[]varint + # MC: ClientboundSetPlayerInventoryPacket + packet_set_player_inventory: + slotId: varint + contents?: Slot + # MC: ClientboundSetPlayerTeamPacket + packet_teams: + team: string + mode: i8 + name: mode ? + if 0: anonymousNbt + if 2: anonymousNbt + default: void + friendlyFire: mode ? + if 0: i8 + if 2: i8 + default: void + nameTagVisibility: mode ? + if 0: string + if 2: string + default: void + collisionRule: mode ? + if 0: string + if 2: string + default: void + formatting: mode ? + if 0: varint + if 2: varint + default: void + prefix: mode ? + if 0: anonymousNbt + if 2: anonymousNbt + default: void + suffix: mode ? + if 0: anonymousNbt + if 2: anonymousNbt + default: void + players: mode ? + if 0: string[]varint + if 3: string[]varint + if 4: string[]varint + default: void + # MC: ClientboundSetScorePacket + packet_scoreboard_score: + itemName: string + scoreName: string + value: varint + display_name?: anonymousNbt + number_format?: varint + styling: number_format ? + if 1: anonymousNbt + if 2: anonymousNbt + default: void + # MC: ClientboundSetSimulationDistancePacket + packet_simulation_distance: + distance: varint + # MC: ClientboundSetSubtitleTextPacket + packet_set_title_subtitle: + text: anonymousNbt + # MC: ClientboundSetTimePacket + packet_update_time: + age: i64 + time: i64 + tickDayTime: bool + # MC: ClientboundSetTitleTextPacket + packet_set_title_text: + text: anonymousNbt + # MC: ClientboundSetTitlesAnimationPacket + packet_set_title_time: + fadeIn: i32 + stay: i32 + fadeOut: i32 + # MC: ClientboundSoundEntityPacket + packet_entity_sound_effect: + soundId: varint + soundEvent: soundId ? + if 0: + resource: string + range?: f32 + default: void + soundCategory: soundSource + entityId: varint + volume: f32 + pitch: f32 + seed: i64 + # MC: ClientboundSoundPacket + packet_sound_effect: + soundId: varint + soundEvent: soundId ? + if 0: + resource: string + range?: f32 + default: void + soundCategory: soundSource + x: i32 + y: i32 + z: i32 + volume: f32 + pitch: f32 + seed: i64 + # MC: ClientboundStartConfigurationPacket + packet_start_configuration: + # Empty + # MC: ClientboundStopSoundPacket + packet_stop_sound: + flags: i8 + source: flags ? + if 1: varint + if 3: varint + default: void + sound: flags ? + if 2: string + if 3: string + default: void + ## (Store Cookie is Common) + # MC: ClientboundSystemChatPacket + packet_system_chat: + content: anonymousNbt + isActionBar: bool + # MC: ClientboundTabListPacket + packet_playerlist_header: + header: anonymousNbt + footer: anonymousNbt + # MC: ClientboundTagQueryPacket + packet_nbt_query_response: + transactionId: varint + nbt: anonOptionalNbt + # MC: ClientboundTakeItemEntityPacket + packet_collect: + collectedEntityId: varint + collectorEntityId: varint + pickupItemCount: varint + # MC: ClientboundTeleportEntityPacket + packet_entity_teleport: + entityId: varint + x: f64 + y: f64 + z: f64 + yaw: i8 + pitch: i8 + onGround: bool + # MC: ClientboundTickingStatePacket + packet_set_ticking_state: + tick_rate: f32 + is_frozen: bool + # MC: ClientboundTickingStepPacket + packet_step_tick: + tick_steps: varint + ## (Transfer is common) + # MC: ClientboundUpdateAdvancementsPacket + packet_advancements: + reset: bool + advancementMapping: []varint + key: string + value: + parentId?: string + displayData?: + title: anonymousNbt + description: anonymousNbt + icon: Slot + frameType: varint + flags: ["bitfield", [ + { "name": "unused", "size": 29, "signed": false }, + { "name": "hidden", "size": 1, "signed": false }, + { "name": "show_toast", "size": 1, "signed": false }, + { "name": "has_background_texture", "size": 1, "signed": false } + ]] + backgroundTexture: flags/has_background_texture ? + if 1: string + default: void + xCord: f32 + yCord: f32 + requirements: []varint + _: string[]varint + sendsTelemtryData: bool + identifiers: string[]varint + progressMapping: []varint + key: string + value: []varint + criterionIdentifier: string + criterionProgress?: i64 + # MC: ClientboundUpdateAttributesPacket + packet_entity_update_attributes: + entityId: varint + properties: []varint + key: varint => + - generic.armor + - generic.armor_toughness + - generic.attack_damage + - generic.attack_knockback + - generic.attack_speed + - player.block_break_speed + - player.block_interaction_range + - player.entity_interaction_range + - generic.fall_damage_multiplier + - generic.flying_speed + - generic.follow_range + - generic.gravity + - generic.jump_strength + - generic.knockback_resistance + - generic.luck + - generic.max_absorption + - generic.max_health + - generic.movement_speed + - generic.safe_fall_distance + - generic.scale + - zombie.spawn_reinforcements + - generic.step_height + value: f64 + modifiers: []varint + uuid: string + amount: f64 + operation: i8 + # MC: ClientboundUpdateMobEffectPacket + packet_entity_effect: + entityId: varint + effectId: varint + amplifier: varint + duration: varint + # a bitfield of 0x01 for ambient, 0x02 for show particles + # flags: ["bitfield", [ + # { "name": "unused", "size": 4 }, + # { "name": "ambient", "size": 1 }, + # { "name": "showParticles", "size": 1 }, + # { "name": "showIcon", "size": 1 }, + # { "name": "blend", "size": 1 } + # ]] + flags: u8 + # MC: ClientboundUpdateRecipesPacket + packet_declare_recipes: + recipes: []varint + name: string + items: varint[]varint + stoneCutterRecipes: []varint + input: IDSet + slotDisplay: SlotDisplay + + # MC: ClientboundUpdateTagsPacket + packet_tags: + tags: []varint + tagType: string + tags: tags + # MC: ClientboundProjectilePowerPacket + packet_set_projectile_power: + id: varint + accelerationPower: f64 + ## (ClientboundCustomReportDetailsPacket, ClientboundServerLinksPacket is common) + + packet: + name: varint => + - bundle_delimiter + - spawn_entity + - spawn_entity_experience_orb + - animation + - statistics + - acknowledge_player_digging + - block_break_animation + - tile_entity_data + - block_action + - block_change + - boss_bar + - difficulty + - chunk_batch_finished + - chunk_batch_start + - chunk_biomes + - clear_titles + - tab_complete + - declare_commands + - close_window + - window_items + - craft_progress_bar + - set_slot + - cookie_request + - set_cooldown + - chat_suggestions + - custom_payload + - damage_event + - debug_sample + - hide_message + - kick_disconnect + - profileless_chat + - entity_status + - sync_entity_position + - explosion + - unload_chunk + - game_state_change + - open_horse_window + - hurt_animation + - initialize_world_border + - keep_alive + - map_chunk + - world_event + - world_particles + - update_light + - login + - map + - trade_list + - rel_entity_move + - entity_move_look + - move_minecart + - entity_look + - vehicle_move + - open_book + - open_window + - open_sign_entity + - ping + - ping_response + - craft_recipe_response + - abilities + - player_chat + - end_combat_event + - enter_combat_event + - death_combat_event + - player_remove + - player_info + - face_player + - position + - player_rotation + - recipe_book_add + - recipe_book_remove + - recipe_book_settings + - entity_destroy + - remove_entity_effect + - reset_score + - remove_resource_pack + - add_resource_pack + - respawn + - entity_head_rotation + - multi_block_change + - select_advancement_tab + - server_data + - action_bar + - world_border_center + - world_border_lerp_size + - world_border_size + - world_border_warning_delay + - world_border_warning_reach + - camera + - update_view_position + - update_view_distance + - set_cursor_item + - spawn_position + - scoreboard_display_objective + - entity_metadata + - attach_entity + - entity_velocity + - entity_equipment + - experience + - update_health + - held_item_slot + - scoreboard_objective + - set_passengers + - set_player_inventory + - teams + - scoreboard_score + - simulation_distance + - set_title_subtitle + - update_time + - set_title_text + - set_title_time + - entity_sound_effect + - sound_effect + - start_configuration + - stop_sound + - store_cookie + - system_chat + - playerlist_header + - nbt_query_response + - collect + - entity_teleport + - set_ticking_state + - step_tick + - transfer + - advancements + - entity_update_attributes + - entity_effect + - declare_recipes + - tags + - set_projectile_power + - custom_report_details + - server_links + params: name ? + if bundle_delimiter: void + if spawn_entity: packet_spawn_entity + if spawn_entity_experience_orb: packet_spawn_entity_experience_orb + if animation: packet_animation + if statistics: packet_statistics + if acknowledge_player_digging: packet_acknowledge_player_digging + if block_break_animation: packet_block_break_animation + if tile_entity_data: packet_tile_entity_data + if block_action: packet_block_action + if block_change: packet_block_change + if boss_bar: packet_boss_bar + if difficulty: packet_difficulty + if chunk_batch_finished: packet_chunk_batch_finished + if chunk_batch_start: packet_chunk_batch_start + if chunk_biomes: packet_chunk_biomes + if clear_titles: packet_clear_titles + if tab_complete: packet_tab_complete + if declare_commands: packet_declare_commands + if close_window: packet_close_window + if window_items: packet_window_items + if craft_progress_bar: packet_craft_progress_bar + if set_slot: packet_set_slot + if cookie_request: packet_common_cookie_request + if set_cooldown: packet_set_cooldown + if chat_suggestions: packet_chat_suggestions + if custom_payload: packet_custom_payload + if damage_event: packet_damage_event + if debug_sample: packet_debug_sample + if hide_message: packet_hide_message + if kick_disconnect: packet_kick_disconnect + if profileless_chat: packet_profileless_chat + if entity_status: packet_entity_status + if sync_entity_position: packet_sync_entity_position + if explosion: packet_explosion + if unload_chunk: packet_unload_chunk + if game_state_change: packet_game_state_change + if open_horse_window: packet_open_horse_window + if hurt_animation: packet_hurt_animation + if initialize_world_border: packet_initialize_world_border + if keep_alive: packet_keep_alive + if map_chunk: packet_map_chunk + if world_event: packet_world_event + if world_particles: packet_world_particles + if update_light: packet_update_light + if login: packet_login + if map: packet_map + if trade_list: packet_trade_list + if rel_entity_move: packet_rel_entity_move + if entity_move_look: packet_entity_move_look + if move_minecart: packet_move_minecart + if entity_look: packet_entity_look + if vehicle_move: packet_vehicle_move + if open_book: packet_open_book + if open_window: packet_open_window + if open_sign_entity: packet_open_sign_entity + if ping: packet_ping + if ping_response: packet_ping_response + if craft_recipe_response: packet_craft_recipe_response + if abilities: packet_abilities + if player_chat: packet_player_chat + if end_combat_event: packet_end_combat_event + if enter_combat_event: packet_enter_combat_event + if death_combat_event: packet_death_combat_event + if player_remove: packet_player_remove + if player_info: packet_player_info + if face_player: packet_face_player + if position: packet_position + if player_rotation: packet_player_rotation + if recipe_book_add: packet_recipe_book_add + if recipe_book_remove: packet_recipe_book_remove + if recipe_book_settings: packet_recipe_book_settings + if entity_destroy: packet_entity_destroy + if remove_entity_effect: packet_remove_entity_effect + if reset_score: packet_reset_score + if remove_resource_pack: packet_common_remove_resource_pack + if add_resource_pack: packet_common_add_resource_pack + if respawn: packet_respawn + if entity_head_rotation: packet_entity_head_rotation + if multi_block_change: packet_multi_block_change + if select_advancement_tab: packet_select_advancement_tab + if server_data: packet_server_data + if action_bar: packet_action_bar + if world_border_center: packet_world_border_center + if world_border_lerp_size: packet_world_border_lerp_size + if world_border_size: packet_world_border_size + if world_border_warning_delay: packet_world_border_warning_delay + if world_border_warning_reach: packet_world_border_warning_reach + if camera: packet_camera + if update_view_position: packet_update_view_position + if update_view_distance: packet_update_view_distance + if set_cursor_item: packet_set_cursor_item + if held_item_slot: packet_held_item_slot + if spawn_position: packet_spawn_position + if scoreboard_display_objective: packet_scoreboard_display_objective + if entity_metadata: packet_entity_metadata + if attach_entity: packet_attach_entity + if entity_velocity: packet_entity_velocity + if entity_equipment: packet_entity_equipment + if experience: packet_experience + if update_health: packet_update_health + if scoreboard_objective: packet_scoreboard_objective + if set_passengers: packet_set_passengers + if set_player_inventory: packet_set_player_inventory + if teams: packet_teams + if scoreboard_score: packet_scoreboard_score + if simulation_distance: packet_simulation_distance + if set_title_subtitle: packet_set_title_subtitle + if update_time: packet_update_time + if set_title_text: packet_set_title_text + if set_title_time: packet_set_title_time + if entity_sound_effect: packet_entity_sound_effect + if sound_effect: packet_sound_effect + if start_configuration: packet_start_configuration + if stop_sound: packet_stop_sound + if store_cookie: packet_common_store_cookie + if system_chat: packet_system_chat + if playerlist_header: packet_playerlist_header + if nbt_query_response: packet_nbt_query_response + if collect: packet_collect + if entity_teleport: packet_entity_teleport + if set_ticking_state: packet_set_ticking_state + if step_tick: packet_step_tick + if transfer: packet_common_transfer + if advancements: packet_advancements + if entity_update_attributes: packet_entity_update_attributes + if entity_effect: packet_entity_effect + if declare_recipes: packet_declare_recipes + if tags: packet_tags + if set_projectile_power: packet_set_projectile_power + if custom_report_details: packet_common_custom_report_details + if server_links: packet_common_server_links + +^play.toServer.types: + # MC: ServerboundAcceptTeleportationPacket + packet_teleport_confirm: + teleportId: varint + # MC: ServerboundBlockEntityTagQueryPacket + packet_query_block_nbt: + transactionId: varint + location: position + # MC: ServerboundSelectBundleItemPacket + packet_select_bundle_item: + slotId: varint + selectedItemIndex: varint + # MC: ServerboundChangeDifficultyPacket + packet_set_difficulty: + newDifficulty: u8 + # MC: ServerboundChatAckPacket + packet_message_acknowledgement: + count: varint + # MC: ServerboundChatCommandPacket + packet_chat_command: + command: string + # MC: ServerboundChatCommandSignedPacket + packet_chat_command_signed: + command: string + timestamp: i64 + salt: i64 + argumentSignatures: []varint + argumentName: string + signature: [ + "buffer", + { + "count": 256 + } + ] + messageCount: varint + acknowledged: [ + "buffer", + { + "count": 3 + } + ] + # MC: ServerboundChatPacket + packet_chat_message: + message: string + timestamp: i64 + salt: i64 + signature?: [ + "buffer", + { + "count": 256 + } + ] + offset: varint + acknowledged: [ + "buffer", + { + "count": 3 + } + ] + # MC: ServerboundChatSessionUpdatePacket + packet_chat_session_update: + sessionUUID: UUID + expireTime: i64 + publicKey: ByteArray + signature: ByteArray + # MC: ServerboundChunkBatchReceivedPacket + packet_chunk_batch_received: + chunksPerTick: f32 + # MC: ServerboundClientCommandPacket + packet_client_command: + actionId: varint + # MC: ServerboundClientTickEndPacket + packet_tick_end: + # Empty + # MC: ServerboundClientInformationPacket + packet_settings: + locale: string + viewDistance: i8 + chatFlags: varint + chatColors: bool + skinParts: u8 + mainHand: varint + enableTextFiltering: bool + enableServerListing: bool + particleStatus: varint => + - all + - decreased + - minimal + # MC: ServerboundCommandSuggestionPacket + packet_tab_complete: + transactionId: varint + text: string + # MC: ServerboundConfigurationAcknowledgedPacket + packet_configuration_acknowledged: + # Empty + # MC: ServerboundContainerButtonClickPacket + packet_enchant_item: + windowId: ContainerID + enchantment: i8 + # MC: ServerboundContainerClickPacket + packet_window_click: + windowId: ContainerID + stateId: varint + slot: i16 + mouseButton: i8 + mode: varint + changedSlots: []varint + location: i16 + item: Slot + cursorItem: Slot + # MC: ServerboundContainerClosePacket + packet_close_window: + windowId: ContainerID + # MC: ServerboundContainerSlotStateChangedPacket + packet_set_slot_state: + slot_id: varint + window_id: ContainerID + state: bool + ## (ServerboundCookieResponsePacket is common) + # MC: ServerboundCustomPayloadPacket + packet_custom_payload: + channel: string + data: restBuffer + # MC: ServerboundDebugSampleSubscriptionPacket + packet_debug_sample_subscription: + type: varint + # MC: ServerboundEditBookPacket + packet_edit_book: + hand: varint + pages: string[]varint + title?: string + # MC: ServerboundEntityTagQuery + packet_query_entity_nbt: + transactionId: varint + entityId: varint + # MC: ServerboundInteractPacket + packet_use_entity: + target: varint + mouse: varint + x: mouse ? + if 2: f32 + default: void + y: mouse ? + if 2: f32 + default: void + z: mouse ? + if 2: f32 + default: void + hand: mouse ? + if 0: varint + if 2: varint + default: void + sneaking: bool + # MC: ServerboundJigsawGeneratePacket + packet_generate_structure: + location: position + levels: varint + keepJigsaws: bool + # MC: ServerboundKeepAlivePacket + packet_keep_alive: + keepAliveId: i64 + # MC: ServerboundLockDifficultyPacket + packet_lock_difficulty: + locked: bool + + MovementFlags: ["bitflags", { + "type": "u8", + "flags": ["onGround", "hasHorizontalCollision"] + }] + # MC: ServerboundMovePlayerPacket.Pos + packet_position: + x: f64 + y: f64 + z: f64 + flags: MovementFlags + # MC: ServerboundMovePlayerPacket.PosRot + packet_position_look: + x: f64 + y: f64 + z: f64 + yaw: f32 + pitch: f32 + flags: MovementFlags + # MC: ServerboundMovePlayerPacket.Rot + packet_look: + yaw: f32 + pitch: f32 + flags: MovementFlags + # MC: ServerboundMovePlayerPacket.StatusOnly + packet_flying: + flags: MovementFlags + # MC: ServerboundMoveVehiclePacket + packet_vehicle_move: + x: f64 + y: f64 + z: f64 + yaw: f32 + pitch: f32 + # MC: ServerboundPaddleBoatPacket + packet_steer_boat: + leftPaddle: bool + rightPaddle: bool + # MC: ServerboundPickItemPacket + packet_pick_item: + slot: varint + # MC: ServerboundPingRequestPacket + packet_ping_request: + id: i64 + # MC: ServerboundPlaceRecipePacket + packet_craft_recipe_request: + windowId: ContainerID + recipeId: varint + makeAll: bool + # MC: ServerboundPlayerAbilitiesPacket + packet_abilities: + flags: i8 + # MC: ServerboundPlayerActionPacket + packet_block_dig: + status: varint + location: position + face: i8 + sequence: varint + # MC: ServerboundPlayerCommandPacket + packet_entity_action: + entityId: varint + actionId: varint + jumpBoost: varint + # MC: ServerboundPlayerInputPacket + # previously: packet_steer_vehicle + packet_player_input: + ## client/net/minecraft/world/entity/player/Input.java + inputs: ["bitflags", { + "type": "u8", + "flags": ["forward", "backward", "left", "right", "jump", "shift", "sprint"] + }] + # MC: ServerboundPongPacket + packet_pong: + id: i32 + # MC: ServerboundRecipeBookChangeSettingsPacket + packet_recipe_book: + bookId: varint + bookOpen: bool + filterActive: bool + # MC: ServerboundRecipeBookSeenRecipePacket + packet_displayed_recipe: + recipeId: varint + # MC: ServerboundRenameItemPacket + packet_name_item: + name: string + # MC: ServerboundResourcePackPacket + packet_resource_pack_receive: + uuid: UUID + result: varint + # MC: ServerboundSeenAdvancementsPacket + packet_advancement_tab: + action: varint + tabId: action ? + if 0: string + if 1: void + # MC: ServerboundSelectTradePacket + packet_select_trade: + slot: varint + # MC: ServerboundSetBeaconPacket + packet_set_beacon_effect: + primary_effect?: varint + secondary_effect?: varint + # MC: ServerboundSetCarriedItemPacket + packet_held_item_slot: + slotId: i16 + # MC: ServerboundSetCommandBlockPacket + packet_update_command_block: + location: position + command: string + mode: varint + flags: u8 + # MC: ServerboundSetCommandMinecartPacket + packet_update_command_block_minecart: + entityId: varint + command: string + track_output: bool + # MC: ServerboundSetCreativeModeSlotPacket + packet_set_creative_slot: + slot: i16 + item: Slot + # MC: ServerboundSetJigsawBlockPacket + packet_update_jigsaw_block: + location: position + name: string + target: string + pool: string + finalState: string + jointType: string + selection_priority: varint + placement_priority: varint + # MC: ServerboundSetStructureBlockPacket + packet_update_structure_block: + location: position + action: varint + mode: varint + name: string + offset_x: i8 + offset_y: i8 + offset_z: i8 + size_x: i8 + size_y: i8 + size_z: i8 + mirror: varint + rotation: varint + metadata: string + integrity: f32 + seed: varint + flags: u8 + # MC: ServerboundSignUpdatePacket + packet_update_sign: + location: position + isFrontText: bool + text1: string + text2: string + text3: string + text4: string + # MC: ServerboundSwingPacket + packet_arm_animation: + hand: varint + # MC: ServerboundTeleportToEntityPacket + packet_spectate: + target: UUID + # MC: ServerboundUseItemOnPacket + packet_block_place: + hand: varint + location: position + direction: varint + cursorX: f32 + cursorY: f32 + cursorZ: f32 + insideBlock: bool + worldBorderHit: bool + sequence: varint + # MC: ServerboundUseItemPacket + packet_use_item: + hand: varint + sequence: varint + rotation: vec2f + + packet: + name: varint => + - teleport_confirm + - query_block_nbt + - select_bundle_item + - set_difficulty + - message_acknowledgement + - chat_command + - chat_command_signed + - chat_message + - chat_session_update + - chunk_batch_received + - client_command + - tick_end + - settings + - tab_complete + - configuration_acknowledged + # Maybe rename enchant_item if it is used for other things too + - enchant_item + - window_click + - close_window + - set_slot_state + - cookie_response + - custom_payload + - debug_sample_subscription + - edit_book + - query_entity_nbt + - use_entity + - generate_structure + - keep_alive + - lock_difficulty + - position + - position_look + - look + - flying + - vehicle_move + - steer_boat + - pick_item + - ping_request + - craft_recipe_request + - abilities + - block_dig + - entity_action + - player_input + - pong + - recipe_book + - displayed_recipe + - name_item + - resource_pack_receive + - advancement_tab + - select_trade + - set_beacon_effect + - held_item_slot + - update_command_block + - update_command_block_minecart + - set_creative_slot + - update_jigsaw_block + - update_structure_block + - update_sign + - arm_animation + - spectate + - block_place + - use_item + params: name ? + if teleport_confirm: packet_teleport_confirm + if query_block_nbt: packet_query_block_nbt + if select_bundle_item: packet_select_bundle_item + if set_difficulty: packet_set_difficulty + if message_acknowledgement: packet_message_acknowledgement + if chat_command: packet_chat_command + if chat_command_signed: packet_chat_command_signed + if chat_message: packet_chat_message + if chat_session_update: packet_chat_session_update + if chunk_batch_received: packet_chunk_batch_received + if client_command: packet_client_command + if tick_end: packet_tick_end + if settings: packet_settings + if tab_complete: packet_tab_complete + if configuration_acknowledged: packet_configuration_acknowledged + if enchant_item: packet_enchant_item + if window_click: packet_window_click + if close_window: packet_close_window + if set_slot_state: packet_set_slot_state + if cookie_response: packet_common_cookie_response + if custom_payload: packet_custom_payload + if edit_book: packet_edit_book + if query_entity_nbt: packet_query_entity_nbt + if use_entity: packet_use_entity + if generate_structure: packet_generate_structure + if keep_alive: packet_keep_alive + if lock_difficulty: packet_lock_difficulty + if position: packet_position + if position_look: packet_position_look + if look: packet_look + if flying: packet_flying + if vehicle_move: packet_vehicle_move + if steer_boat: packet_steer_boat + if pick_item: packet_pick_item + if ping_request: packet_ping_request + if craft_recipe_request: packet_craft_recipe_request + if abilities: packet_abilities + if block_dig: packet_block_dig + if entity_action: packet_entity_action + if player_input: packet_player_input + if pong: packet_pong + if recipe_book: packet_recipe_book + if displayed_recipe: packet_displayed_recipe + if name_item: packet_name_item + if resource_pack_receive: packet_resource_pack_receive + if advancement_tab: packet_advancement_tab + if select_trade: packet_select_trade + if set_beacon_effect: packet_set_beacon_effect + if held_item_slot: packet_held_item_slot + if update_command_block: packet_update_command_block + if update_command_block_minecart: packet_update_command_block_minecart + if set_creative_slot: packet_set_creative_slot + if update_jigsaw_block: packet_update_jigsaw_block + if update_structure_block: packet_update_structure_block + if update_sign: packet_update_sign + if arm_animation: packet_arm_animation + if spectate: packet_spectate + if block_place: packet_block_place + if use_item: packet_use_item \ No newline at end of file diff --git a/data/pc/1.21.3/protocol.json b/data/pc/1.21.3/protocol.json index 7ef9d8b3f..7571957b2 100644 --- a/data/pc/1.21.3/protocol.json +++ b/data/pc/1.21.3/protocol.json @@ -125,256 +125,6 @@ } ], "ContainerID": "varint", - "SoundEvent": [ - "container", - [ - { - "name": "soundName", - "type": "string" - }, - { - "name": "fixedRange", - "type": [ - "option", - "f32" - ] - } - ] - ], - "RecipeDisplay": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "crafting_shapeless", - "1": "crafting_shaped", - "2": "furnace", - "3": "stonecutter", - "4": "smithing" - } - } - ] - }, - { - "name": "data", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "crafting_shapeless": [ - "container", - [ - { - "name": "ingredients", - "type": [ - "array", - { - "countType": "varint", - "type": "SlotDisplay" - } - ] - }, - { - "name": "result", - "type": "SlotDisplay" - }, - { - "name": "craftingStation", - "type": "SlotDisplay" - } - ] - ], - "crafting_shaped": [ - "container", - [ - { - "name": "width", - "type": "varint" - }, - { - "name": "height", - "type": "varint" - }, - { - "name": "ingredients", - "type": [ - "array", - { - "countType": "varint", - "type": "SlotDisplay" - } - ] - }, - { - "name": "result", - "type": "SlotDisplay" - }, - { - "name": "craftingStation", - "type": "SlotDisplay" - } - ] - ], - "furnace": [ - "container", - [ - { - "name": "ingredient", - "type": "SlotDisplay" - }, - { - "name": "fuel", - "type": "SlotDisplay" - }, - { - "name": "result", - "type": "SlotDisplay" - }, - { - "name": "craftingStation", - "type": "SlotDisplay" - }, - { - "name": "duration", - "type": "varint" - }, - { - "name": "experience", - "type": "f32" - } - ] - ], - "stonecutter": [ - "container", - [ - { - "name": "ingredient", - "type": "SlotDisplay" - }, - { - "name": "result", - "type": "SlotDisplay" - }, - { - "name": "craftingStation", - "type": "SlotDisplay" - } - ] - ], - "smithing": [ - "container", - [ - { - "name": "template", - "type": "SlotDisplay" - }, - { - "name": "base", - "type": "SlotDisplay" - }, - { - "name": "addition", - "type": "SlotDisplay" - }, - { - "name": "result", - "type": "SlotDisplay" - }, - { - "name": "craftingStation", - "type": "SlotDisplay" - } - ] - ] - } - } - ] - } - ] - ], - "SlotDisplay": [ - "container", - [ - { - "name": "type", - "type": [ - "mapper", - { - "type": "varint", - "mappings": { - "0": "empty", - "1": "any_fuel", - "2": "item", - "3": "item_stack", - "4": "tag", - "5": "smithing_trim", - "6": "with_remainder", - "7": "composite" - } - } - ] - }, - { - "name": "data", - "type": [ - "switch", - { - "compareTo": "type", - "fields": { - "empty": "void", - "any_fuel": "void", - "item": "varint", - "item_stack": "Slot", - "tag": "string", - "simthing_trim": [ - "container", - [ - { - "name": "base", - "type": "SlotDisplay" - }, - { - "name": "material", - "type": "SlotDisplay" - }, - { - "name": "pattern", - "type": "SlotDisplay" - } - ] - ], - "with_remainder": [ - "container", - [ - { - "name": "input", - "type": "SlotDisplay" - }, - { - "name": "remainder", - "type": "SlotDisplay" - } - ] - ], - "composite": [ - "array", - { - "countType": "varint", - "type": "SlotDisplay" - } - ] - } - } - ] - } - ] - ], "SlotComponentType": [ "mapper", { @@ -531,7 +281,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -550,7 +300,7 @@ "array", { "countType": "varint", - "type": "BlockPredicate" + "type": "ItemBlockPredicate" } ] }, @@ -690,7 +440,7 @@ "baseName": "soundId", "otherwise": { "name": "data", - "type": "SoundEvent" + "type": "ItemSoundEvent" } } ] @@ -705,7 +455,7 @@ "array", { "countType": "varint", - "type": "ConsumeEffect" + "type": "ItemConsumeEffect" } ] } @@ -804,7 +554,7 @@ "baseName": "soundId", "otherwise": { "name": "data", - "type": "SoundEvent" + "type": "ItemSoundEvent" } } ] @@ -863,7 +613,7 @@ "array", { "countType": "varint", - "type": "ConsumeEffect" + "type": "ItemConsumeEffect" } ] } @@ -970,7 +720,7 @@ "array", { "countType": "varint", - "type": "PotionEffect" + "type": "ItemPotionEffect" } ] }, @@ -1016,7 +766,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] } @@ -1050,7 +800,7 @@ "array", { "countType": "varint", - "type": "BookPage" + "type": "ItemBookPage" } ] }, @@ -1351,7 +1101,7 @@ } ] ], - "firework_explosion": "FireworkExplosion", + "firework_explosion": "ItemFireworkExplosion", "fireworks": [ "container", [ @@ -1365,7 +1115,7 @@ "array", { "countType": "varint", - "type": "FireworkExplosion" + "type": "ItemFireworkExplosion" } ] } @@ -1374,21 +1124,19 @@ "profile": [ "container", [ - { - "name": "hasName", - "type": "bool" - }, { "name": "name", - "type": "string" - }, - { - "name": "hasUniqueId", - "type": "bool" + "type": [ + "option", + "string" + ] }, { - "name": "uniqueId", - "type": "UUID" + "name": "uuid", + "type": [ + "option", + "UUID" + ] }, { "name": "properties", @@ -1407,13 +1155,12 @@ "name": "value", "type": "string" }, - { - "name": "hasSignature", - "type": "bool" - }, { "name": "signature", - "type": "string" + "type": [ + "option", + "string" + ] } ] ] @@ -1571,73 +1318,23 @@ } ] ], - "Slot": [ + "ItemSoundEvent": [ "container", [ { - "name": "itemCount", - "type": "varint" + "name": "soundName", + "type": "string" }, { - "anon": true, + "name": "fixedRange", "type": [ - "switch", - { - "compareTo": "itemCount", - "fields": { - "0": "void" - }, - "default": [ - "container", - [ - { - "name": "itemId", - "type": "varint" - }, - { - "name": "addedComponentCount", - "type": "varint" - }, - { - "name": "removedComponentCount", - "type": "varint" - }, - { - "name": "components", - "type": [ - "array", - { - "count": "addedComponentCount", - "type": "SlotComponent" - } - ] - }, - { - "name": "removeComponents", - "type": [ - "array", - { - "count": "removedComponentCount", - "type": [ - "container", - [ - { - "name": "type", - "type": "SlotComponentType" - } - ] - ] - } - ] - } - ] - ] - } + "option", + "f32" ] } ] ], - "FireworkExplosion": [ + "ItemFireworkExplosion": [ "container", [ { @@ -1686,23 +1383,7 @@ } ] ], - "BookPage": [ - "container", - [ - { - "name": "content", - "type": "string" - }, - { - "name": "filteredContent", - "type": [ - "option", - "string" - ] - } - ] - ], - "EffectDetail": [ + "ItemEffectDetail": [ "container", [ { @@ -1729,12 +1410,12 @@ "name": "hiddenEffect", "type": [ "option", - "EffectDetail" + "ItemEffectDetail" ] } ] ], - "PotionEffect": [ + "ItemPotionEffect": [ "container", [ { @@ -1743,11 +1424,102 @@ }, { "name": "details", - "type": "EffectDetail" + "type": "ItemEffectDetail" } ] ], - "ConsumeEffect": [ + "ItemBlockProperty": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "isExactMatch", + "type": "bool" + }, + { + "name": "exactValue", + "type": [ + "option", + "string" + ] + }, + { + "name": "minValue", + "type": [ + "option", + "string" + ] + }, + { + "name": "maxValue", + "type": [ + "option", + "string" + ] + } + ] + ], + "ItemBlockPredicate": [ + "container", + [ + { + "name": "blockSet", + "type": [ + "option", + [ + "registryEntryHolderSet", + { + "base": { + "name": "name", + "type": "string" + }, + "otherwise": { + "name": "blockIds", + "type": "varint" + } + } + ] + ] + }, + { + "name": "properties", + "type": [ + "option", + [ + "array", + { + "countType": "varint", + "type": "ItemBlockProperty" + } + ] + ] + }, + { + "name": "nbt", + "type": "anonOptionalNbt" + } + ] + ], + "ItemBookPage": [ + "container", + [ + { + "name": "content", + "type": "string" + }, + { + "name": "filteredContent", + "type": [ + "option", + "string" + ] + } + ] + ], + "ItemConsumeEffect": [ "container", [ { @@ -1782,7 +1554,7 @@ "array", { "countType": "varint", - "type": "PotionEffect" + "type": "ItemPotionEffect" } ] }, @@ -1822,91 +1594,82 @@ "baseName": "soundId", "otherwise": { "name": "data", - "type": "SoundEvent" + "type": "ItemSoundEvent" } } ] } ] ] - } - } - ] - } - ] - ], - "BlockProperty": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "isExactMatch", - "type": "bool" - }, - { - "name": "exactValue", - "type": [ - "option", - "string" - ] - }, - { - "name": "minValue", - "type": [ - "option", - "string" - ] - }, - { - "name": "maxValue", - "type": [ - "option", - "string" + } + } ] } ] ], - "BlockPredicate": [ + "Slot": [ "container", [ { - "name": "blockSet", - "type": [ - "option", - [ - "registryEntryHolderSet", - { - "base": { - "name": "name", - "type": "string" - }, - "otherwise": { - "name": "blockIds", - "type": "varint" - } - } - ] - ] + "name": "itemCount", + "type": "varint" }, { - "name": "properties", + "anon": true, "type": [ - "option", - [ - "array", - { - "countType": "varint", - "type": "BlockProperty" - } - ] + "switch", + { + "compareTo": "itemCount", + "fields": { + "0": "void" + }, + "default": [ + "container", + [ + { + "name": "item", + "type": "varint" + }, + { + "name": "addedComponentCount", + "type": "varint" + }, + { + "name": "removedComponentCount", + "type": "varint" + }, + { + "name": "components", + "type": [ + "array", + { + "count": "addedComponentCount", + "type": "SlotComponent" + } + ] + }, + { + "name": "removeComponents", + "type": [ + "array", + { + "count": "removedComponentCount", + "type": [ + "container", + [ + { + "name": "type", + "type": "SlotComponentType" + } + ] + ] + } + ] + } + ] + ] + } ] - }, - { - "name": "nbt", - "type": "anonOptionalNbt" } ] ], @@ -2109,7 +1872,7 @@ "container", [ { - "name": "position_type", + "name": "positionType", "type": [ "mapper", { @@ -2126,7 +1889,7 @@ "type": [ "switch", { - "compareTo": "position_type", + "compareTo": "positionType", "fields": { "block": "position", "entity": [ @@ -2137,7 +1900,7 @@ "type": "varint" }, { - "name": "entity_eye_height", + "name": "entityEyeHeight", "type": "f32" } ] @@ -4144,6 +3907,240 @@ "play": { "toClient": { "types": { + "SlotDisplay": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "empty", + "1": "any_fuel", + "2": "item", + "3": "item_stack", + "4": "tag", + "5": "smithing_trim", + "6": "with_remainder", + "7": "composite" + } + } + ] + }, + { + "name": "data", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "empty": "void", + "any_fuel": "void", + "item": "varint", + "item_stack": "Slot", + "tag": "string", + "simthing_trim": [ + "container", + [ + { + "name": "base", + "type": "SlotDisplay" + }, + { + "name": "material", + "type": "SlotDisplay" + }, + { + "name": "pattern", + "type": "SlotDisplay" + } + ] + ], + "with_remainder": [ + "container", + [ + { + "name": "input", + "type": "SlotDisplay" + }, + { + "name": "remainder", + "type": "SlotDisplay" + } + ] + ], + "composite": [ + "array", + { + "countType": "varint", + "type": "SlotDisplay" + } + ] + } + } + ] + } + ] + ], + "RecipeDisplay": [ + "container", + [ + { + "name": "type", + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "crafting_shapeless", + "1": "crafting_shaped", + "2": "furnace", + "3": "stonecutter", + "4": "smithing" + } + } + ] + }, + { + "name": "data", + "type": [ + "switch", + { + "compareTo": "type", + "fields": { + "crafting_shapeless": [ + "container", + [ + { + "name": "ingredients", + "type": [ + "array", + { + "countType": "varint", + "type": "SlotDisplay" + } + ] + }, + { + "name": "result", + "type": "SlotDisplay" + }, + { + "name": "craftingStation", + "type": "SlotDisplay" + } + ] + ], + "crafting_shaped": [ + "container", + [ + { + "name": "width", + "type": "varint" + }, + { + "name": "height", + "type": "varint" + }, + { + "name": "ingredients", + "type": [ + "array", + { + "countType": "varint", + "type": "SlotDisplay" + } + ] + }, + { + "name": "result", + "type": "SlotDisplay" + }, + { + "name": "craftingStation", + "type": "SlotDisplay" + } + ] + ], + "furnace": [ + "container", + [ + { + "name": "ingredient", + "type": "SlotDisplay" + }, + { + "name": "fuel", + "type": "SlotDisplay" + }, + { + "name": "result", + "type": "SlotDisplay" + }, + { + "name": "craftingStation", + "type": "SlotDisplay" + }, + { + "name": "duration", + "type": "varint" + }, + { + "name": "experience", + "type": "f32" + } + ] + ], + "stonecutter": [ + "container", + [ + { + "name": "ingredient", + "type": "SlotDisplay" + }, + { + "name": "result", + "type": "SlotDisplay" + }, + { + "name": "craftingStation", + "type": "SlotDisplay" + } + ] + ], + "smithing": [ + "container", + [ + { + "name": "template", + "type": "SlotDisplay" + }, + { + "name": "base", + "type": "SlotDisplay" + }, + { + "name": "addition", + "type": "SlotDisplay" + }, + { + "name": "result", + "type": "SlotDisplay" + }, + { + "name": "craftingStation", + "type": "SlotDisplay" + } + ] + ] + } + } + ] + } + ] + ], "SpawnInfo": [ "container", [ @@ -6076,7 +6073,7 @@ "update_listed", "update_latency", "update_display_name", - "update_priority" + "update_list_order" ] } ] @@ -6177,7 +6174,7 @@ "type": [ "switch", { - "compareTo": "../action/update_priority", + "compareTo": "../action/update_list_order", "fields": { "true": "varint" }, diff --git a/data/pc/1.8/proto.yml b/data/pc/1.8/proto.yml index 384ad4b74..039903716 100644 --- a/data/pc/1.8/proto.yml +++ b/data/pc/1.8/proto.yml @@ -544,37 +544,34 @@ entries: []varint name: string value: varint - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.8.9/client/net/minecraft/network/play/server/S38PacketPlayerListItem.java#L113 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_abilities: flags: i8 flyingSpeed: f32 diff --git a/data/pc/1.8/protocol.json b/data/pc/1.8/protocol.json index 733701a1a..82096efed 100644 --- a/data/pc/1.8/protocol.json +++ b/data/pc/1.8/protocol.json @@ -1981,7 +1981,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1993,105 +2005,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.9.1-pre2/proto.yml b/data/pc/1.9.1-pre2/proto.yml index 37c4caa5c..d095be31d 100644 --- a/data/pc/1.9.1-pre2/proto.yml +++ b/data/pc/1.9.1-pre2/proto.yml @@ -517,37 +517,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.8.9/client/net/minecraft/network/play/server/S38PacketPlayerListItem.java#L113 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.9.1-pre2/protocol.json b/data/pc/1.9.1-pre2/protocol.json index ed9618932..67bbf374d 100644 --- a/data/pc/1.9.1-pre2/protocol.json +++ b/data/pc/1.9.1-pre2/protocol.json @@ -1785,7 +1785,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1797,105 +1809,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.9.2/proto.yml b/data/pc/1.9.2/proto.yml index d152ef208..caa1f8940 100644 --- a/data/pc/1.9.2/proto.yml +++ b/data/pc/1.9.2/proto.yml @@ -517,37 +517,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.8.9/client/net/minecraft/network/play/server/S38PacketPlayerListItem.java#L113 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.9.2/protocol.json b/data/pc/1.9.2/protocol.json index ed9618932..67bbf374d 100644 --- a/data/pc/1.9.2/protocol.json +++ b/data/pc/1.9.2/protocol.json @@ -1785,7 +1785,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1797,105 +1809,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.9.4/proto.yml b/data/pc/1.9.4/proto.yml index ac07cba4e..af0482701 100644 --- a/data/pc/1.9.4/proto.yml +++ b/data/pc/1.9.4/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.8.9/client/net/minecraft/network/play/server/S38PacketPlayerListItem.java#L113 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.9.4/protocol.json b/data/pc/1.9.4/protocol.json index c17c9127f..6e432d722 100644 --- a/data/pc/1.9.4/protocol.json +++ b/data/pc/1.9.4/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/1.9/proto.yml b/data/pc/1.9/proto.yml index a7db93447..8e94be03e 100644 --- a/data/pc/1.9/proto.yml +++ b/data/pc/1.9/proto.yml @@ -517,37 +517,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.8.9/client/net/minecraft/network/play/server/S38PacketPlayerListItem.java#L113 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/1.9/protocol.json b/data/pc/1.9/protocol.json index 5a6fcdae3..7054f046d 100644 --- a/data/pc/1.9/protocol.json +++ b/data/pc/1.9/protocol.json @@ -1785,7 +1785,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1797,105 +1809,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/15w40b/proto.yml b/data/pc/15w40b/proto.yml index 904243242..1533a8d86 100644 --- a/data/pc/15w40b/proto.yml +++ b/data/pc/15w40b/proto.yml @@ -538,37 +538,34 @@ entries: []varint name: string value: varint - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_abilities: flags: i8 flyingSpeed: f32 diff --git a/data/pc/15w40b/protocol.json b/data/pc/15w40b/protocol.json index 6b2b44ca2..67bfa10ab 100644 --- a/data/pc/15w40b/protocol.json +++ b/data/pc/15w40b/protocol.json @@ -1908,7 +1908,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1920,105 +1932,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/16w20a/proto.yml b/data/pc/16w20a/proto.yml index cb7d84342..9d401b001 100644 --- a/data/pc/16w20a/proto.yml +++ b/data/pc/16w20a/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/16w20a/protocol.json b/data/pc/16w20a/protocol.json index 955e88dfb..0989afb1e 100644 --- a/data/pc/16w20a/protocol.json +++ b/data/pc/16w20a/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/16w35a/proto.yml b/data/pc/16w35a/proto.yml index dae685bab..e1d0558f3 100644 --- a/data/pc/16w35a/proto.yml +++ b/data/pc/16w35a/proto.yml @@ -518,37 +518,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/16w35a/protocol.json b/data/pc/16w35a/protocol.json index 8781eafe3..9e14485cb 100644 --- a/data/pc/16w35a/protocol.json +++ b/data/pc/16w35a/protocol.json @@ -1795,7 +1795,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1807,105 +1819,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/17w15a/proto.yml b/data/pc/17w15a/proto.yml index 6b52f141f..7deceee57 100644 --- a/data/pc/17w15a/proto.yml +++ b/data/pc/17w15a/proto.yml @@ -544,37 +544,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/17w15a/protocol.json b/data/pc/17w15a/protocol.json index f2745ac78..6cc973365 100644 --- a/data/pc/17w15a/protocol.json +++ b/data/pc/17w15a/protocol.json @@ -1971,7 +1971,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1983,105 +1995,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/17w18b/proto.yml b/data/pc/17w18b/proto.yml index e20259efe..212d36cb5 100644 --- a/data/pc/17w18b/proto.yml +++ b/data/pc/17w18b/proto.yml @@ -545,37 +545,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/17w18b/protocol.json b/data/pc/17w18b/protocol.json index 59bf9cd97..a591a3187 100644 --- a/data/pc/17w18b/protocol.json +++ b/data/pc/17w18b/protocol.json @@ -1975,7 +1975,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -1987,105 +1999,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/17w50a/proto.yml b/data/pc/17w50a/proto.yml index dfb95ce35..1ee904aad 100644 --- a/data/pc/17w50a/proto.yml +++ b/data/pc/17w50a/proto.yml @@ -738,37 +738,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/17w50a/protocol.json b/data/pc/17w50a/protocol.json index 4c4472348..ddbdd9c3f 100644 --- a/data/pc/17w50a/protocol.json +++ b/data/pc/17w50a/protocol.json @@ -2363,7 +2363,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2375,105 +2387,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/20w13b/proto.yml b/data/pc/20w13b/proto.yml index ef293938f..0e7b0c78c 100644 --- a/data/pc/20w13b/proto.yml +++ b/data/pc/20w13b/proto.yml @@ -915,37 +915,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/20w13b/protocol.json b/data/pc/20w13b/protocol.json index 32b85f226..b9286ca55 100644 --- a/data/pc/20w13b/protocol.json +++ b/data/pc/20w13b/protocol.json @@ -2863,7 +2863,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2875,105 +2887,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/21w07a/proto.yml b/data/pc/21w07a/proto.yml index 1a19c0ffd..614e6e78c 100644 --- a/data/pc/21w07a/proto.yml +++ b/data/pc/21w07a/proto.yml @@ -931,37 +931,34 @@ message: event ? if 2: string default: void - packet_player_info: - action: varint + # MC: ClientboundPlayerInfoPacket + packet_player_info: + action: varint => + - add_player + - update_game_mode + - update_latency + - update_display_name + - remove_player + ## https://github.com/extremeheat/extracted_minecraft_data/blob/client1.18.1/client/net/minecraft/network/protocol/game/ClientboundPlayerInfoPacket.java#L122 data: []varint - UUID: UUID - name: ../action ? - if 0: string - default: void - properties: ../action ? - if 0: []varint + uuid: UUID + _: ../action ? + if add_player: name: string - value: string - signature?: string - default: void - gamemode: ../action ? - if 0: varint - if 1: varint - default: void - ping: ../action ? - if 0: varint - if 2: varint - default: void - displayName: ../action ? - if 0: [ - "option", - "string" - ] - if 3: [ - "option", - "string" - ] - default: void + properties: []varint + name: string + value: string + signature?: string + gamemode: varint + ping: varint + displayName?: nbt + if update_game_mode: + gamemode: varint + if update_latency: + ping: varint + if update_display_name: + displayName?: nbt + if remove_player: void packet_position: x: f64 y: f64 diff --git a/data/pc/21w07a/protocol.json b/data/pc/21w07a/protocol.json index 4b0c78505..10dd5cddd 100644 --- a/data/pc/21w07a/protocol.json +++ b/data/pc/21w07a/protocol.json @@ -2897,7 +2897,19 @@ [ { "name": "action", - "type": "varint" + "type": [ + "mapper", + { + "type": "varint", + "mappings": { + "0": "add_player", + "1": "update_game_mode", + "2": "update_latency", + "3": "update_display_name", + "4": "remove_player" + } + } + ] }, { "name": "data", @@ -2909,105 +2921,101 @@ "container", [ { - "name": "UUID", + "name": "uuid", "type": "UUID" }, { - "name": "name", + "anon": true, "type": [ "switch", { "compareTo": "../action", "fields": { - "0": "string" - }, - "default": "void" - } - ] - }, - { - "name": "properties", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "array", - { - "countType": "varint", - "type": [ - "container", - [ - { - "name": "name", - "type": "string" - }, - { - "name": "value", - "type": "string" - }, + "add_player": [ + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "properties", + "type": [ + "array", { - "name": "signature", + "countType": "varint", "type": [ - "option", - "string" + "container", + [ + { + "name": "name", + "type": "string" + }, + { + "name": "value", + "type": "string" + }, + { + "name": "signature", + "type": [ + "option", + "string" + ] + } + ] ] } ] - ] - } - ] - }, - "default": "void" - } - ] - }, - { - "name": "gamemode", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "1": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "ping", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": "varint", - "2": "varint" - }, - "default": "void" - } - ] - }, - { - "name": "displayName", - "type": [ - "switch", - { - "compareTo": "../action", - "fields": { - "0": [ - "option", - "string" + }, + { + "name": "gamemode", + "type": "varint" + }, + { + "name": "ping", + "type": "varint" + }, + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] ], - "3": [ - "option", - "string" - ] - }, - "default": "void" + "update_game_mode": [ + "container", + [ + { + "name": "gamemode", + "type": "varint" + } + ] + ], + "update_latency": [ + "container", + [ + { + "name": "ping", + "type": "varint" + } + ] + ], + "update_display_name": [ + "container", + [ + { + "name": "displayName", + "type": [ + "option", + "nbt" + ] + } + ] + ], + "remove_player": "void" + } } ] } diff --git a/data/pc/latest/proto.yml b/data/pc/latest/proto.yml index 73050b589..1db79540c 100644 --- a/data/pc/latest/proto.yml +++ b/data/pc/latest/proto.yml @@ -34,12 +34,7 @@ registryEntryHolder: native registryEntryHolderSet: native ByteArray: ["buffer", { "countType": "varint" }] - string: [ - "pstring", - { - "countType": "varint" - } - ] + string: ["pstring", { "countType": "varint" }] vec2f: x: f32 y: f32 @@ -61,136 +56,77 @@ "otherwise": { name: "ids", type: "varint" } }] ContainerID: varint - SoundEvent: - soundName: string - fixedRange?: f32 - RecipeDisplay: - type: varint => - - crafting_shapeless - - crafting_shaped - - furnace - - stonecutter - - smithing - data: type ? - if crafting_shapeless: - ingredients: SlotDisplay[]varint - result: SlotDisplay - craftingStation: SlotDisplay - if crafting_shaped: - width: varint - height: varint - ingredients: SlotDisplay[]varint - result: SlotDisplay - craftingStation: SlotDisplay - if furnace: - ingredient: SlotDisplay - fuel: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - duration: varint - experience: f32 - if stonecutter: - ingredient: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - if smithing: - template: SlotDisplay - base: SlotDisplay - addition: SlotDisplay - result: SlotDisplay - craftingStation: SlotDisplay - SlotDisplay: - type: varint => - - empty - - any_fuel - - item - - item_stack - - tag - - smithing_trim - - with_remainder - - composite - data: type ? - if empty or any_fuel: void - if item: varint - if item_stack: Slot - if tag: string - if simthing_trim: - base: SlotDisplay - material: SlotDisplay - pattern: SlotDisplay - if with_remainder: - input: SlotDisplay - remainder: SlotDisplay - if composite: SlotDisplay[]varint SlotComponentType: varint => - - custom_data - - max_stack_size - - max_damage - - damage - - unbreakable - - custom_name - - item_name - - item_model - - lore - - rarity - - enchantments - - can_place_on - - can_break - - attribute_modifiers - - custom_model_data - - hide_additional_tooltip - - hide_tooltip - - repair_cost - - creative_slot_lock - - enchantment_glint_override - - intangible_projectile - - food - - consumable - - use_remainder - - use_cooldown - - damage_resistant - - tool - - enchantable - - equippable - - repairable - - glider - - tooltip_style - - death_protection - - stored_enchantments - - dyed_color - - map_color - - map_id - - map_decorations - - map_post_processing - - charged_projectiles - - bundle_contents - - potion_contents - - suspicious_stew_effects - - writable_book_content - - written_book_content - - trim - - debug_stick_state - - entity_data - - bucket_entity_data - - block_entity_data - - instrument - - ominous_bottle_amplifier - - jukebox_playable - - recipes - - lodestone_tracker - - firework_explosion - - fireworks - - profile - - note_block_sound - - banner_patterns - - base_color - - pot_decorations - - container - - block_state - - bees - - lock - - container_loot + - custom_data + - max_stack_size + - max_damage + - damage + - unbreakable + - custom_name + - item_name + - item_model + - lore + - rarity + - enchantments + - can_place_on + - can_break + - attribute_modifiers + - custom_model_data + - hide_additional_tooltip + - hide_tooltip + - repair_cost + - creative_slot_lock + - enchantment_glint_override + - intangible_projectile + - food + - consumable + - use_remainder + - use_cooldown + - damage_resistant + - tool + - enchantable + - equippable + - repairable + - glider + - tooltip_style + - death_protection + - stored_enchantments + - dyed_color + - map_color + - map_id + - map_decorations + - map_post_processing + - charged_projectiles + - bundle_contents + - potion_contents + - suspicious_stew_effects + - writable_book_content + - written_book_content + - trim + - debug_stick_state + - entity_data + - bucket_entity_data + - block_entity_data + - instrument + - ominous_bottle_amplifier + - jukebox_playable + - recipes + - lodestone_tracker + - firework_explosion + - fireworks + - profile + - note_block_sound + - banner_patterns + - base_color + - pot_decorations + - container + - block_state + - bees + - lock + - container_loot + # Instead of sending NBT for items over the network, Minecraft since 1.20.5 sends a + # list of components that make up the item. This saves bandwidth by not encoding tag names. SlotComponent: type: SlotComponentType ## Ref: client/net/minecraft/core/component/DataComponents.java @@ -216,7 +152,7 @@ level: varint showTooltip: bool if can_place_on or can_break: - predicates: BlockPredicate[]varint + predicates: ItemBlockPredicate[]varint showTooltip: bool if attribute_modifiers: attributes: []varint @@ -267,10 +203,10 @@ - brush sound: ["registryEntryHolder", { "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } + "otherwise": { name: "data", type: "ItemSoundEvent" } }] makes_particles: bool - effects: ConsumeEffect[]varint + effects: ItemConsumeEffect[]varint if use_remainder: Slot if use_cooldown: seconds: f32 @@ -299,7 +235,7 @@ - body sound: ["registryEntryHolder", { "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } + "otherwise": { name: "data", type: "ItemSoundEvent" } }] model?: string cameraOverlay?: string @@ -311,7 +247,7 @@ items: IDSet if tooltip_style: string if death_protection: - effects: ConsumeEffect[]varint + effects: ItemConsumeEffect[]varint if stored_enchantments: enchantments: []varint # The ID of the enchantment in the enchantment registry. @@ -335,40 +271,25 @@ potionId?: varint # The RGB components of the color, encoded as an integer. customColor?: varint - customEffects: PotionEffect[]varint + customEffects: ItemPotionEffect[]varint customName: string - # Name Type Description - # Number Of Effects VarInt Number of elements in the following array. - # Effect Type ID Array VarInt Enum The ID of the effect in the potion effect type registry. - # Duration VarInt The duration of the effect. if suspicious_stew_effects: effects: []varint + # The ID of the effect in the potion effect type registry. effect: varint + # The duration of the effect. duration: varint - # Name Type Description - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) String (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional String (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. if writable_book_content: - pages: BookPage[]varint - # Name Type Description - # Raw Title String (32) The raw title of the book. - # Has Filtered Title Boolean - # Filtered Title Optional String (32) The title after going through chat filters. Only present if Has Filtered Title is true. - # Author String - # Generation VarInt - # Number Of Pages VarInt Number of elements in the following array. - # Page Raw Content Array (100) TextComponent (1024) The raw text of the page. - # Has Filtered Content Boolean - # Filtered Content Optional Text Component (1024) The content after passing through chat filters. Only present if Has Filtered Content is true. - # Resolved Boolean Whether entity selectors have already been resolved. + # Max 100 pages + pages: ItemBookPage[]varint if written_book_content: + # The raw title of the book, up to 32 characters. rawTitle: string filteredTitle?: string author: string generation: varint - pages: BookPage[]varint + # Max 100 pages + pages: ItemBookPage[]varint # Whether entity selectors have already been resolved. resolved: bool # Name Type Description @@ -465,53 +386,28 @@ songLocation: string showInTooltip: bool if recipes: anonymousNbt - # Name Type Description - # Has Global Position Boolean Whether this lodestone points to a position, otherwise it spins randomly. - # Dimension Identifier The dimension the compass points to. Only present if Has Global Position is true. - # Position Position The position the compass points to. Only present if Has Global Position is true. - # Tracked Boolean Whether the component is removed when the associated lodestone is broken. if lodestone_tracker: + # Specified if this lodestone points to a position; otherwise it spins randomly. globalPosition?: dimension: string + # The position the compass points to. Only present if Has Global Position is true. position: position + # Whether the component is removed when the associated lodestone is broken. tracked: bool - # Name Type Description - # Shape VarInt Enum Can be one of the following: - # 0 - Small ball - # 1 - Large ball - # 2 - Star - # 3 - Creeper - # 4 - Burst - # Number Of Colors VarInt The number of elements in the following array. - # Colors Array of Int The RGB components of the color, encoded as an integer. - # Number Of Fade Colors VarInt The number of elements in the following array. - # Fade Colors Array of Int The RGB components of the color, encoded as an integer. - # Has Trail Boolean - # Has Twinkle Boolean - if firework_explosion: FireworkExplosion + if firework_explosion: ItemFireworkExplosion if fireworks: flightDuration: varint - explosions: FireworkExplosion[]varint - # Name Type Description - # Has Name Boolean - # Name Optional String (16) Only present if Has Name is true. - # Has Unique ID Boolean - # Unique ID Optional UUID Only present if Has Unique ID is true. - # Number of Properties VarInt Number of elements in the following array. - # Property Name Array String (64) - # Value String - # Has Signature Boolean - # Signature String (1024) Only present if Has Signature is true. + explosions: ItemFireworkExplosion[]varint if profile: - hasName: bool - name: string - hasUniqueId: bool - uniqueId: UUID + # If the profile has a name, max 16 characters. + name?: string + uuid?: UUID properties: []varint + # Max 64 characters property: string value: string - hasSignature: bool - signature: string + # Max 1024 characters + signature?: string if note_block_sound: string # Name Type Description # Number of Layers VarInt Number of elements in the following array. @@ -557,48 +453,65 @@ if lock: anonymousNbt if container_loot: anonymousNbt - Slot: - itemCount: varint - _: itemCount ? - if 0: void - default: - itemId: varint -# https://wiki.vg/Slot_Data#Structured_components - addedComponentCount: varint - removedComponentCount: varint - components: SlotComponent[]$addedComponentCount - removeComponents: []$removedComponentCount - type: SlotComponentType + # TODO: add to ClientboundExplodePacket and ClientboundSoundEntityPacket and ClientboundSoundPacket (and maybe other) packet which also use HolderSet + ItemSoundEvent: + soundName: string + fixedRange?: f32 - FireworkExplosion: + ItemFireworkExplosion: shape: varint => - - small_ball - - large_ball - - star - - creeper - - burst + - small_ball + - large_ball + - star + - creeper + - burst + # The RGB components of the color, encoded as an integer. colors: i32[]varint + # The RGB components of the color, encoded as an integer. fadeColors: i32[]varint + # Whether the firework has a trail. hasTrail: bool + # Whether the firework has a twinkle effect. hasTwinkle: bool - BookPage: - content: string - filteredContent?: string - - EffectDetail: + ItemEffectDetail: amplifier: varint duration: varint ambient: bool showParticles: bool showIcon: bool - hiddenEffect?: EffectDetail + hiddenEffect?: ItemEffectDetail - PotionEffect: + ItemPotionEffect: id: varint - details: EffectDetail + details: ItemEffectDetail - ConsumeEffect: + ItemBlockProperty: + # Name of the block state property. + name: string + # Whether this is an exact value match, as opposed to ranged. + isExactMatch: bool + # Value of the block state property. Only present in exact match mode. + exactValue?: string + # Minimum value of the block state property range. Only present in ranged match mode. + minValue?: string + # Maximum value of the block state property range. Only present in ranged match mode. + maxValue?: string + + ItemBlockPredicate: + blockSet?: ["registryEntryHolderSet", { + "base": { name: "name", type: "string" }, + "otherwise": { name: "blockIds", type: "varint" } + }] + properties?: ItemBlockProperty[]varint + nbt: anonOptionalNbt + + ItemBookPage: + # The raw text of the page. TextComponent, max 1024 characters. + content: string + filteredContent?: string + + ItemConsumeEffect: # 1.21.3 type: varint => - apply_effects - remove_effects @@ -607,7 +520,7 @@ - play_sound _: type ? if apply_effects: - effects: PotionEffect[]varint + effects: ItemPotionEffect[]varint probability: f32 if remove_effects: effects: IDSet @@ -617,144 +530,137 @@ if play_sound: sound: ["registryEntryHolder", { "baseName": "soundId", - "otherwise": { name: "data", type: "SoundEvent" } + "otherwise": { name: "data", type: "ItemSoundEvent" } }] - BlockProperty: - # Name of the block state property. - name: string - # Whether this is an exact value match, as opposed to ranged. - isExactMatch: bool - # Value of the block state property. Only present in exact match mode. - exactValue?: string - # Minimum value of the block state property range. Only present in ranged match mode. - minValue?: string - # Maximum value of the block state property range. Only present in ranged match mode. - maxValue?: string - - BlockPredicate: - blockSet?: ["registryEntryHolderSet", { - "base": { name: "name", type: "string" }, - "otherwise": { name: "blockIds", type: "varint" } - }] - properties?: BlockProperty[]varint - nbt: anonOptionalNbt + Slot: + itemCount: varint + _: itemCount ? + if 0: void + default: + itemId: varint + # https://wiki.vg/Slot_Data#Structured_components + addedComponentCount: varint + removedComponentCount: varint + components: SlotComponent[]$addedComponentCount + removeComponents: []$removedComponentCount + type: SlotComponentType Particle: # See client/net/minecraft/core/particles/ParticleTypes.java type: varint => - - angry_villager - - block - - block_marker - - bubble - - cloud - - crit - - damage_indicator - - dragon_breath - - dripping_lava - - falling_lava - - landing_lava - - dripping_water - - falling_water - - dust - - dust_color_transition - - effect - - elder_guardian - - enchanted_hit - - enchant - - end_rod - - entity_effect - - explosion_emitter - - explosion - - gust - - small_gust - - gust_emitter_large - - gust_emitter_small - - sonic_boom - - falling_dust - - firework - - fishing - - flame - - infested - - cherry_leaves - - pale_oak_leaves - - sculk_soul - - sculk_charge - - sculk_charge_pop - - soul_fire_flame - - soul - - flash - - happy_villager - - composter - - heart - - instant_effect - - item - - vibration - - trail - - item_slime - - item_cobweb - - item_snowball - - large_smoke - - lava - - mycelium - - note - - poof - - portal - - rain - - smoke - - white_smoke - - sneeze - - spit - - squid_ink - - sweep_attack - - totem_of_undying - - underwater - - splash - - witch - - bubble_pop - - current_down - - bubble_column_up - - nautilus - - dolphin - - campfire_cosy_smoke - - campfire_signal_smoke - - dripping_honey - - falling_honey - - landing_honey - - falling_nectar - - falling_spore_blossom - - ash - - crimson_spore - - warped_spore - - spore_blossom_air - - dripping_obsidian_tear - - falling_obsidian_tear - - landing_obsidian_tear - - reverse_portal - - white_ash - - small_flame - - snowflake - - dripping_dripstone_lava - - falling_dripstone_lava - - dripping_dripstone_water - - falling_dripstone_water - - glow_squid_ink - - glow - - wax_on - - wax_off - - electric_spark - - scrape - - shriek - - egg_crack - - dust_plume - - trial_spawner_detected_player - - trial_spawner_detected_player_ominous - - vault_connection - - dust_pillar - - ominous_spawning - - raid_omen - - trial_omen - - block_crumble + - angry_villager + - block + - block_marker + - bubble + - cloud + - crit + - damage_indicator + - dragon_breath + - dripping_lava + - falling_lava + - landing_lava + - dripping_water + - falling_water + - dust + - dust_color_transition + - effect + - elder_guardian + - enchanted_hit + - enchant + - end_rod + - entity_effect + - explosion_emitter + - explosion + - gust + - small_gust + - gust_emitter_large + - gust_emitter_small + - sonic_boom + - falling_dust + - firework + - fishing + - flame + - infested + - cherry_leaves + - pale_oak_leaves + - sculk_soul + - sculk_charge + - sculk_charge_pop + - soul_fire_flame + - soul + - flash + - happy_villager + - composter + - heart + - instant_effect + - item + - vibration + - trail + - item_slime + - item_cobweb + - item_snowball + - large_smoke + - lava + - mycelium + - note + - poof + - portal + - rain + - smoke + - white_smoke + - sneeze + - spit + - squid_ink + - sweep_attack + - totem_of_undying + - underwater + - splash + - witch + - bubble_pop + - current_down + - bubble_column_up + - nautilus + - dolphin + - campfire_cosy_smoke + - campfire_signal_smoke + - dripping_honey + - falling_honey + - landing_honey + - falling_nectar + - falling_spore_blossom + - ash + - crimson_spore + - warped_spore + - spore_blossom_air + - dripping_obsidian_tear + - falling_obsidian_tear + - landing_obsidian_tear + - reverse_portal + - white_ash + - small_flame + - snowflake + - dripping_dripstone_lava + - falling_dripstone_lava + - dripping_dripstone_water + - falling_dripstone_water + - glow_squid_ink + - glow + - wax_on + - wax_off + - electric_spark + - scrape + - shriek + - egg_crack + - dust_plume + - trial_spawner_detected_player + - trial_spawner_detected_player_ominous + - vault_connection + - dust_pillar + - ominous_spawning + - raid_omen + - trial_omen + - block_crumble ## ## Tips for reviewing particle data (as of 1.20.5) ## Inside the registry code, each particle can have an associated "options" type and ## each options type can add additional data to be encoded. @@ -789,14 +695,14 @@ if sculk_charge: f32 if shriek: varint if vibration: - position_type: varint => + positionType: varint => - block - entity - position: position_type ? + position: positionType ? if block: position if entity: entityId: varint - entity_eye_height: f32 + entityEyeHeight: f32 ticks: varint if trail: target: vec3f64 @@ -1317,16 +1223,16 @@ promptMessage?: anonymousNbt ServerLinkType: varint => - - bug_report - - community_guidelines - - support - - status - - feedback - - community - - website - - forums - - news - - announcements + - bug_report + - community_guidelines + - support + - status + - feedback + - community + - website + - forums + - news + - announcements # MC: ClientboundServerLinksPacket # This packet contains a list of links that the Notchian client will display in the menu # available from the pause menu. Link labels can be built-in or custom (i.e., any text). @@ -1607,7 +1513,64 @@ if custom_report_details: packet_common_custom_report_details if server_links: packet_common_server_links ^play.toClient.types: - # World state information for spawn and respawn packets + SlotDisplay: + type: varint => + - empty + - any_fuel + - item + - item_stack + - tag + - smithing_trim + - with_remainder + - composite + data: type ? + if empty or any_fuel: void + if item: varint + if item_stack: Slot + if tag: string + if simthing_trim: + base: SlotDisplay + material: SlotDisplay + pattern: SlotDisplay + if with_remainder: + input: SlotDisplay + remainder: SlotDisplay + if composite: SlotDisplay[]varint + RecipeDisplay: + type: varint => + - crafting_shapeless + - crafting_shaped + - furnace + - stonecutter + - smithing + data: type ? + if crafting_shapeless: + ingredients: SlotDisplay[]varint + result: SlotDisplay + craftingStation: SlotDisplay + if crafting_shaped: + width: varint + height: varint + ingredients: SlotDisplay[]varint + result: SlotDisplay + craftingStation: SlotDisplay + if furnace: + ingredient: SlotDisplay + fuel: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay + duration: varint + experience: f32 + if stonecutter: + ingredient: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay + if smithing: + template: SlotDisplay + base: SlotDisplay + addition: SlotDisplay + result: SlotDisplay + craftingStation: SlotDisplay # World state information for spawn and respawn packets SpawnInfo: dimension: varint @@ -2016,7 +1979,7 @@ pitch: i8 onGround: bool # MC: ClientboundMoveMinecartPacket - packet_move_minecart: + packet_move_minecart: # 1.21.3 entityId: varint steps: []varint position: vec3f @@ -2101,6 +2064,7 @@ players: UUID[]varint # MC: ClientboundPlayerInfoUpdatePacket packet_player_info: + ## ClientboundPlayerInfoUpdatePacket.java#L160 action: ["bitflags", { "type": "u8", "flags": [ @@ -2111,7 +2075,7 @@ "update_latency", "update_display_name", "update_hat", - "update_priority" + "update_list_order" ] }] data: []varint @@ -2132,9 +2096,9 @@ if true: varint default: void displayName: ../action/update_display_name ? - if true: anonOptionalNbt + if true: ["option", "anonymousNbt"] default: void - listPriority: ../action/update_priority ? + listPriority: ../action/update_list_order ? if true: varint default: void showHat: ../action/update_hat ? @@ -2160,19 +2124,6 @@ "type": "u32", "flags": ["x", "y", "z", "yaw", "pitch", "dx", "dy", "dz", "yawDelta"] }] - # PositionUpdateRelatives: ["bitfield", [ - # # unused bits on top - # { "name": "unused", "size": 23, "signed": false }, - # { "name": "yawDelta", "size": 1, "signed": false }, - # { "name": "dz", "size": 1, "signed": false }, - # { "name": "dy", "size": 1, "signed": false }, - # { "name": "dx", "size": 1, "signed": false }, - # { "name": "pitch", "size": 1, "signed": false }, - # { "name": "yaw", "size": 1, "signed": false }, - # { "name": "z", "size": 1, "signed": false }, - # { "name": "y", "size": 1, "signed": false }, - # { "name": "x", "size": 1, "signed": false }, - # ]] # MC: ClientboundPlayerPositionPacket packet_position: teleportId: varint @@ -2243,6 +2194,7 @@ packet_reset_score: entity_name: string objective_name?: string + ## (remove_resource_pack is common) # MC: ClientboundRespawnPacket packet_respawn: worldState: SpawnInfo @@ -3117,6 +3069,9 @@ packet_pick_item_from_entity: entityId: varint includeData: bool + # MC: ServerboundPickItemPacket + packet_pick_item: + slot: varint # MC: ServerboundPingRequestPacket packet_ping_request: id: i64 @@ -3297,6 +3252,7 @@ - steer_boat - pick_item_from_block - pick_item_from_entity + - pick_item - ping_request - craft_recipe_request - abilities @@ -3359,6 +3315,7 @@ if steer_boat: packet_steer_boat if pick_item_from_block: packet_pick_item_from_block if pick_item_from_entity: packet_pick_item_from_entity + if pick_item: packet_pick_item if ping_request: packet_ping_request if craft_recipe_request: packet_craft_recipe_request if abilities: packet_abilities