minecraft-data 3.46.2 → 3.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/data.js +48 -1
  2. package/doc/history.md +8 -0
  3. package/minecraft-data/.github/workflows/bedrock-ci.yml +1 -1
  4. package/minecraft-data/README.md +1 -1
  5. package/minecraft-data/data/bedrock/1.16.220/protocol.json +32 -1
  6. package/minecraft-data/data/bedrock/1.16.220/types.yml +25 -1
  7. package/minecraft-data/data/bedrock/1.17.0/protocol.json +32 -1
  8. package/minecraft-data/data/bedrock/1.17.0/types.yml +25 -1
  9. package/minecraft-data/data/bedrock/1.17.10/protocol.json +32 -1
  10. package/minecraft-data/data/bedrock/1.17.10/types.yml +25 -1
  11. package/minecraft-data/data/bedrock/1.17.30/protocol.json +32 -1
  12. package/minecraft-data/data/bedrock/1.17.30/types.yml +25 -1
  13. package/minecraft-data/data/bedrock/1.17.40/protocol.json +32 -1
  14. package/minecraft-data/data/bedrock/1.17.40/types.yml +25 -1
  15. package/minecraft-data/data/bedrock/1.18.0/protocol.json +32 -1
  16. package/minecraft-data/data/bedrock/1.18.0/types.yml +25 -1
  17. package/minecraft-data/data/bedrock/1.18.11/protocol.json +32 -1
  18. package/minecraft-data/data/bedrock/1.18.11/types.yml +25 -1
  19. package/minecraft-data/data/bedrock/1.18.30/protocol.json +32 -1
  20. package/minecraft-data/data/bedrock/1.18.30/types.yml +25 -1
  21. package/minecraft-data/data/bedrock/1.19.1/protocol.json +32 -1
  22. package/minecraft-data/data/bedrock/1.19.1/types.yml +25 -1
  23. package/minecraft-data/data/bedrock/1.19.10/protocol.json +32 -1
  24. package/minecraft-data/data/bedrock/1.19.10/types.yml +25 -1
  25. package/minecraft-data/data/bedrock/1.19.20/protocol.json +32 -1
  26. package/minecraft-data/data/bedrock/1.19.20/types.yml +25 -1
  27. package/minecraft-data/data/bedrock/1.19.21/protocol.json +32 -1
  28. package/minecraft-data/data/bedrock/1.19.21/types.yml +25 -1
  29. package/minecraft-data/data/bedrock/1.19.30/protocol.json +32 -1
  30. package/minecraft-data/data/bedrock/1.19.30/types.yml +25 -1
  31. package/minecraft-data/data/bedrock/1.19.40/protocol.json +32 -1
  32. package/minecraft-data/data/bedrock/1.19.40/types.yml +25 -1
  33. package/minecraft-data/data/bedrock/1.19.50/protocol.json +32 -1
  34. package/minecraft-data/data/bedrock/1.19.50/types.yml +25 -1
  35. package/minecraft-data/data/bedrock/1.19.60/protocol.json +32 -1
  36. package/minecraft-data/data/bedrock/1.19.60/types.yml +25 -1
  37. package/minecraft-data/data/bedrock/1.19.62/protocol.json +32 -1
  38. package/minecraft-data/data/bedrock/1.19.62/types.yml +25 -1
  39. package/minecraft-data/data/bedrock/1.19.70/protocol.json +32 -1
  40. package/minecraft-data/data/bedrock/1.19.70/types.yml +25 -1
  41. package/minecraft-data/data/bedrock/1.19.80/protocol.json +32 -1
  42. package/minecraft-data/data/bedrock/1.19.80/types.yml +25 -1
  43. package/minecraft-data/data/bedrock/1.20.0/protocol.json +32 -1
  44. package/minecraft-data/data/bedrock/1.20.0/types.yml +25 -1
  45. package/minecraft-data/data/bedrock/1.20.10/protocol.json +32 -1
  46. package/minecraft-data/data/bedrock/1.20.10/types.yml +25 -1
  47. package/minecraft-data/data/bedrock/1.20.30/proto.yml +4084 -0
  48. package/minecraft-data/data/bedrock/1.20.30/protocol.json +35 -2
  49. package/minecraft-data/data/bedrock/1.20.30/types.yml +2154 -0
  50. package/minecraft-data/data/bedrock/1.20.40/protocol.json +11928 -0
  51. package/minecraft-data/data/bedrock/1.20.40/version.json +6 -0
  52. package/minecraft-data/data/bedrock/common/protocolVersions.json +7 -1
  53. package/minecraft-data/data/bedrock/common/versions.json +2 -1
  54. package/minecraft-data/data/bedrock/latest/proto.yml +7 -3
  55. package/minecraft-data/data/bedrock/latest/types.yml +149 -2
  56. package/minecraft-data/data/dataPaths.json +50 -3
  57. package/minecraft-data/data/pc/1.20.2/biomes.json +642 -0
  58. package/minecraft-data/data/pc/1.20.2/blockCollisionShapes.json +122059 -0
  59. package/minecraft-data/data/pc/1.20.2/blocks.json +37132 -0
  60. package/minecraft-data/data/pc/1.20.2/commands.json +18278 -0
  61. package/minecraft-data/data/pc/1.20.2/effects.json +200 -0
  62. package/minecraft-data/data/pc/1.20.2/enchantments.json +875 -0
  63. package/minecraft-data/data/pc/1.20.2/entities.json +1242 -0
  64. package/minecraft-data/data/pc/1.20.2/foods.json +402 -0
  65. package/minecraft-data/data/pc/1.20.2/instruments.json +94 -0
  66. package/minecraft-data/data/pc/1.20.2/items.json +8249 -0
  67. package/minecraft-data/data/pc/1.20.2/language.json +6342 -0
  68. package/minecraft-data/data/pc/1.20.2/mapIcons.json +212 -0
  69. package/minecraft-data/data/pc/1.20.2/materials.json +154 -0
  70. package/minecraft-data/data/pc/1.20.2/particles.json +382 -0
  71. package/minecraft-data/data/pc/1.20.2/protocol.json +7092 -0
  72. package/minecraft-data/data/pc/1.20.2/recipes.json +15143 -0
  73. package/minecraft-data/data/pc/1.20.2/tints.json +447 -0
  74. package/minecraft-data/data/pc/1.20.2/version.json +5 -0
  75. package/minecraft-data/data/pc/common/protocolVersions.json +41 -1
  76. package/minecraft-data/data/pc/common/versions.json +2 -1
  77. package/minecraft-data/doc/history.md +9 -0
  78. package/package.json +1 -1
@@ -0,0 +1,4084 @@
1
+ # Created from MiNET and gophertunnel docs
2
+ # The version below is the latest version this protocol schema was updated for.
3
+ # The output protocol.json will be in the folder for the version
4
+ !version: 1.20.30
5
+
6
+ # Some ProtoDef aliases
7
+ string: ["pstring",{"countType":"varint"}] # String / array types
8
+ ByteArray: ["buffer",{"countType":"varint"}]
9
+ SignedByteArray: ["buffer",{"countType":"zigzag32"}]
10
+ LittleString: ["pstring",{"countType":"li32"}]
11
+ ShortArray: ["buffer",{"countType":"li16"}]
12
+ ShortString: ["pstring",{"countType":"li16"}]
13
+ varint64: native # Some primitives
14
+ zigzag32: native
15
+ zigzag64: native
16
+ uuid: native # Data types & special handling
17
+ byterot: native
18
+ bitflags: native
19
+ restBuffer: native
20
+ encapsulated: native
21
+ nbt: native # NBT
22
+ lnbt: native
23
+ nbtLoop: native
24
+ enum_size_based_on_values_len: native # Packet-specific custom logic
25
+ MapInfo: native
26
+
27
+ # load the packet map file (auto-generated)
28
+ !import: packet_map.yml
29
+
30
+ !StartDocs: Packets
31
+
32
+ # # Login Sequence
33
+ # The login process is as follows:
34
+ #
35
+ # * C→S: [Login](#packet_login)
36
+ # * S→C: [Server To Client Handshake](#packet_server_to_client_handshake)
37
+ # * C→S: [Client To Server Handshake](#packet_client_to_server_handshake)
38
+ # * S→C: [Play Status (Login success)](#packet_play_status)
39
+ # * To spawn, the following packets should be sent, in order, after the ones above:
40
+ # * S→C: [Resource Packs Info](#packet_resource_packs_info)
41
+ # * C→S: [Resource Pack Client Response](#packet_resource_pack_client_response)
42
+ # * S→C: [Resource Pack Stack](#packet_resource_pack_stack)
43
+ # * C→S: [Resource Pack Client Response](#packet_resource_pack_client_response)
44
+ # * S→C: [Start Game](#packet_start_game)
45
+ # * S→C: [Creative Content](#packet_creative_content)
46
+ # * S→C: [Biome Definition List](#packet_biome_definition_list)
47
+ # * S→C: [Chunks](#packet_level_chunk)
48
+ # * S→C: [Play Status (Player spawn)](#packet_play_status)
49
+ #
50
+ # If there are no resource packs being sent, a Resource Pack Stack can be sent directly
51
+ # after Resource Packs Info to avoid the client responses.
52
+ #
53
+ # ===
54
+
55
+ packet_login:
56
+ !id: 0x01
57
+ !bound: server
58
+ # Protocol version (Big Endian!)
59
+ protocol_version: i32
60
+ tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]'
61
+
62
+ LoginTokens:
63
+ # JSON array of JWT data: contains the display name, UUID and XUID
64
+ # It should be signed by the Mojang public key
65
+ identity: LittleString
66
+ # Skin related data
67
+ client: LittleString
68
+
69
+ packet_play_status:
70
+ !id: 0x02
71
+ !bound: client
72
+ status: i32 =>
73
+ # Sent after Login has been successfully decoded and the player has logged in
74
+ 0: login_success
75
+ # Displays "Could not connect: Outdated client!"
76
+ 1: failed_client
77
+ # Displays "Could not connect: Outdated server!"
78
+ 2: failed_spawn
79
+ # Sent after world data to spawn the player
80
+ 3: player_spawn
81
+ # Displays "Unable to connect to world. Your school does not have access to this server."
82
+ 4: failed_invalid_tenant
83
+ # Displays "The server is not running Minecraft: Education Edition. Failed to connect."
84
+ 5: failed_vanilla_edu
85
+ # Displays "The server is running an incompatible edition of Minecraft. Failed to connect."
86
+ 6: failed_edu_vanilla
87
+ # Displays "Wow this server is popular! Check back later to see if space opens up. Server Full"
88
+ 7: failed_server_full
89
+ # Cannot join a vanilla game on editor
90
+ 8: failed_editor_vanilla_mismatch
91
+ # Cannot join an editor game on vanilla
92
+ 9: failed_vanilla_editor_mismatch
93
+
94
+
95
+ packet_server_to_client_handshake:
96
+ !id: 0x03
97
+ !bound: client
98
+ # Contains the salt to complete the Diffie-Hellman key exchange
99
+ token: string
100
+
101
+
102
+ # Sent by the client in response to a Server To Client Handshake packet
103
+ # sent by the server. It is the first encrypted packet in the login handshake
104
+ # and serves as a confirmation that encryption is correctly initialized client side.
105
+ # It has no fields.
106
+ packet_client_to_server_handshake:
107
+ !id: 0x04
108
+ !bound: server
109
+
110
+ # Sent by the server to disconnect a client.
111
+ packet_disconnect:
112
+ !id: 0x05
113
+ !bound: client
114
+ # Specifies if the disconnection screen should be hidden when the client is disconnected,
115
+ # meaning it will be sent directly to the main menu.
116
+ hide_disconnect_reason: bool
117
+ # An optional message to show when disconnected.
118
+ message: string
119
+
120
+
121
+ packet_resource_packs_info:
122
+ !id: 0x06
123
+ !bound: client
124
+ # If the resource pack requires the client accept it.
125
+ must_accept: bool
126
+ # If scripting is enabled.
127
+ has_scripts: bool
128
+ # ForcingServerPacks is currently an unclear field.
129
+ force_server_packs: bool
130
+ # A list of behaviour packs that the client needs to download before joining the server.
131
+ # All of these behaviour packs will be applied together.
132
+ behaviour_packs: BehaviourPackInfos
133
+ # A list of resource packs that the client needs to download before joining the server.
134
+ # The order of these resource packs is not relevant in this packet. It is however important in the Resource Pack Stack packet.
135
+ texture_packs: TexturePackInfos
136
+ # Resource Pack Links contains a list of URLs where the client can download required
137
+ # resource packs, as opposed to the current Minecraft sever sending the data over
138
+ resource_pack_links: []varint
139
+ id: string
140
+ url: string
141
+
142
+ packet_resource_pack_stack:
143
+ !id: 0x07
144
+ !bound: client
145
+ # If the resource pack must be accepted for the player to join the server.
146
+ must_accept: bool
147
+ # [inline]
148
+ behavior_packs: ResourcePackIdVersions
149
+ # [inline]
150
+ resource_packs: ResourcePackIdVersions
151
+ game_version: string
152
+ experiments: Experiments # ??? such random fields
153
+ experiments_previously_used: bool
154
+
155
+ packet_resource_pack_client_response:
156
+ !id: 0x08
157
+ !bound: server
158
+ response_status: u8 =>
159
+ 0: none
160
+ 1: refused
161
+ 2: send_packs
162
+ 3: have_all_packs
163
+ 4: completed
164
+ # All of the pack IDs.
165
+ resourcepackids: ResourcePackIds
166
+
167
+ # Sent by the client to the server to send chat messages, and by the server to the client
168
+ # to forward or send messages, which may be chat, popups, tips etc.
169
+ ## https://github.com/pmmp/PocketMine-MP/blob/a43b46a93cb127f037c879b5d8c29cda251dd60c/src/pocketmine/network/mcpe/protocol/TextPacket.php
170
+ ## https://github.com/Sandertv/gophertunnel/blob/05ac3f843dd60d48b9ca0ab275cda8d9e85d8c43/minecraft/protocol/packet/text.go
171
+ packet_text:
172
+ !id: 0x09
173
+ !bound: both
174
+ # TextType is the type of the text sent. When a client sends this to the server, it should always be
175
+ # TextTypeChat. If the server sends it, it may be one of the other text types above.
176
+ type: u8 =>
177
+ 0: raw
178
+ 1: chat
179
+ 2: translation
180
+ 3: popup
181
+ 4: jukebox_popup
182
+ 5: tip
183
+ 6: system
184
+ 7: whisper
185
+ 8: announcement
186
+ 9: json_whisper
187
+ 10: json
188
+ 11: json_announcement
189
+ # NeedsTranslation specifies if any of the messages need to be translated. It seems that where % is found
190
+ # in translatable text types, these are translated regardless of this bool. Translatable text types
191
+ # include TextTypeTip, TextTypePopup and TextTypeJukeboxPopup.
192
+ needs_translation: bool
193
+ _: type?
194
+ if chat or whisper or announcement:
195
+ source_name: string
196
+ message: string
197
+ if raw or tip or system or json_whisper or json or json_announcement:
198
+ message: string
199
+ if translation or popup or jukebox_popup:
200
+ message: string
201
+ parameters: string[]varint
202
+ # The XUID of the player who sent this message.
203
+ xuid: string
204
+ # PlatformChatID is an identifier only set for particular platforms when chatting (presumably only for
205
+ # Nintendo Switch). It is otherwise an empty string, and is used to decide which players are able to
206
+ # chat with each other.
207
+ platform_chat_id: string
208
+ # For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg
209
+
210
+
211
+ # Sent by the server to update the current time client-side. The client actually advances time
212
+ # client-side by itself, so this packet does not need to be sent each tick. It is merely a means
213
+ # of synchronizing time between server and client.
214
+ packet_set_time:
215
+ !id: 0x0a
216
+ !bound: client
217
+ # Time is the current time. The time is not limited to 24000 (time of day), but continues
218
+ # progressing after that.
219
+ time: zigzag32
220
+
221
+ # Sent by the server to send information about the world the player will be spawned in.
222
+ packet_start_game:
223
+ !id: 0x0b
224
+ !bound: client
225
+ # The unique ID of the player. The unique ID is a value that remains consistent across
226
+ # different sessions of the same world, but most unofficial servers simply fill the
227
+ # runtime ID of the entity out for this field.
228
+ entity_id: zigzag64
229
+ # The runtime ID of the player. The runtime ID is unique for each world session,
230
+ # and entities are generally identified in packets using this runtime ID.
231
+ runtime_entity_id: varint64
232
+ # PlayerGameMode is the game mode the player currently has. It is a value from 0-4, with 0 being
233
+ # survival mode, 1 being creative mode, 2 being adventure mode, 3 being survival spectator and 4 being
234
+ # creative spectator.
235
+ # This field may be set to 5 to make the client fall back to the game mode set in the WorldGameMode
236
+ # field.
237
+ player_gamemode: GameMode
238
+ # The spawn position of the player in the world. In servers this is often the same as the
239
+ # world's spawn position found below.
240
+ player_position: vec3f
241
+ # The pitch and yaw of the player
242
+ rotation: vec2f
243
+ # The seed used to generate the world.
244
+ seed: lu64
245
+ biome_type: li16
246
+ biome_name: string
247
+ # Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2,
248
+ # with 0 being the overworld, 1 being the nether and 2 being the end.
249
+ dimension: zigzag32 =>
250
+ 0: overworld
251
+ 1: nether
252
+ 2: end
253
+ # Generator is the generator used for the world. It is a value from 0-4, with 0 being old
254
+ # limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and
255
+ # 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you
256
+ # send beyond the world limit.
257
+ generator: zigzag32
258
+ # The world game mode that a player gets when it first spawns in the world. It is shown in the
259
+ # settings and is used if the Player Gamemode is set to 5.
260
+ world_gamemode: GameMode
261
+ # Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful,
262
+ # 1 being easy, 2 being normal and 3 being hard.
263
+ difficulty: zigzag32
264
+ # The block on which the world spawn of the world. This coordinate has no effect on the place
265
+ # that the client spawns, but it does have an effect on the direction that a compass poInts.
266
+ spawn_position: BlockCoordinates
267
+ # Defines if achievements are disabled in the world. The client crashes if this value is set
268
+ # to true while the player's or the world's game mode is creative, and it's recommended to simply
269
+ # always set this to false as a server.
270
+ achievements_disabled: bool
271
+ # EditorWorldType is a value to dictate the type of editor mode, a special mode recently introduced adding
272
+ # "powerful tools for editing worlds, intended for experienced creators."
273
+ editor_world_type: zigzag32 =>
274
+ - not_editor
275
+ - project
276
+ - test_level
277
+ # Whether the world was created in editor mode
278
+ created_in_editor: bool
279
+ # Whether the world was exported from editor mode
280
+ exported_from_editor: bool
281
+ # The time at which the day cycle was locked if the day cycle is disabled using the respective
282
+ # game rule. The client will maIntain this time as Boolean as the day cycle is disabled.
283
+ day_cycle_stop_time: zigzag32
284
+ # Some Minecraft: Education Edition field that specifies what 'region' the world was from,
285
+ # with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.
286
+ edu_offer: zigzag32
287
+ # Specifies if the world has education edition features enabled, such as the blocks or entities
288
+ # specific to education edition.
289
+ edu_features_enabled: bool
290
+ edu_product_uuid: string
291
+ # The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.
292
+ rain_level: lf32
293
+ lightning_level: lf32
294
+ # The level specifying the Intensity of the thunder. This may actually be set independently
295
+ # from the rain level, meaning dark clouds can be produced without rain.
296
+ has_confirmed_platform_locked_content: bool
297
+ # Specifies if the world is a multi-player game. This should always be set to true for servers.
298
+ is_multiplayer: bool
299
+ # Specifies if LAN broadcast was Intended to be enabled for the world.
300
+ broadcast_to_lan: bool
301
+ # The mode used to broadcast the joined game across XBOX Live.
302
+ xbox_live_broadcast_mode: varint
303
+ # The mode used to broadcast the joined game across the platform.
304
+ platform_broadcast_mode: varint
305
+ # If commands are enabled for the player. It is recommended to always set this to true on the
306
+ # server, as setting it to false means the player cannot, under any circumstance, use a command.
307
+ enable_commands: bool
308
+ # Specifies if the texture pack the world might hold is required, meaning the client was
309
+ # forced to download it before joining.
310
+ is_texturepacks_required: bool
311
+ # Defines game rules currently active with their respective values. The value of these game
312
+ # rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only,
313
+ # and don't necessarily need to be sent to the client.
314
+ gamerules: GameRules
315
+ experiments: Experiments
316
+ experiments_previously_used: bool
317
+ # Specifies if the world had the bonus map setting enabled when generating it.
318
+ # It does not have any effect client-side.
319
+ bonus_chest: bool
320
+ # Specifies if the world has the start with map setting enabled, meaning each
321
+ # joining player obtains a map. This should always be set to false, because the
322
+ # client obtains a map all on its own accord if this is set to true.
323
+ map_enabled: bool
324
+ # The permission level of the player. It is a value from 0-3, with 0 being visitor,
325
+ # 1 being member, 2 being operator and 3 being custom.
326
+ permission_level: PermissionLevel
327
+ # The radius around the player in which chunks are ticked. Most servers set this value
328
+ # to a fixed number, as it does not necessarily affect anything client-side.
329
+ server_chunk_tick_range: li32
330
+ # Specifies if the texture pack of the world is locked, meaning it cannot be disabled
331
+ # from the world. This is typically set for worlds on the marketplace that have a dedicated
332
+ # texture pack.
333
+ has_locked_behavior_pack: bool
334
+ # Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the
335
+ # world. This is typically set for worlds on the marketplace that have a dedicated texture pack.
336
+ has_locked_resource_pack: bool
337
+ # Specifies if the world from the server was from a locked world template.
338
+ # For servers this should always be set to false.
339
+ is_from_locked_world_template: bool
340
+ msa_gamertags_only: bool
341
+ # Specifies if the world from the server was from a locked world template.
342
+ # For servers this should always be set to false.
343
+ is_from_world_template: bool
344
+ # Specifies if the world was a template that locks all settings that change properties
345
+ # above in the settings GUI. It is recommended to set this to true for servers that
346
+ # do not allow things such as setting game rules through the GUI.
347
+ is_world_template_option_locked: bool
348
+ # A hack that Mojang put in place to preserve backwards compatibility with old villagers.
349
+ # The his never actually read though, so it has no functionality.
350
+ only_spawn_v1_villagers: bool
351
+ # PersonaDisabled is true if persona skins are disabled for the current game session.
352
+ persona_disabled: bool
353
+ # CustomSkinsDisabled is true if custom skins are disabled for the current game session.
354
+ custom_skins_disabled: bool
355
+ # EmoteChatMuted specifies if players will be sent a chat message when using certain emotes.
356
+ emote_chat_muted: bool
357
+ # The version of the game from which Vanilla features will be used.
358
+ # The exact function of this field isn't clear.
359
+ game_version: string
360
+ limited_world_width: li32
361
+ limited_world_length: li32
362
+ is_new_nether: bool
363
+ edu_resource_uri: EducationSharedResourceURI
364
+ experimental_gameplay_override: bool
365
+ # ChatRestrictionLevel specifies the level of restriction on in-game chat.
366
+ chat_restriction_level: u8 =>
367
+ 0: none
368
+ 1: dropped
369
+ 2: disabled
370
+ # DisablePlayerInteractions is true if the client should ignore other players when interacting with the world.
371
+ disable_player_interactions: bool
372
+ # A base64 encoded world ID that is used to identify the world.
373
+ level_id: string
374
+ # The name of the world that the player is joining. Note that this field shows up
375
+ # above the player list for the rest of the game session, and cannot be changed.
376
+ # Setting the server name to this field is recommended.
377
+ world_name: string
378
+ # A UUID specific to the premium world template that might have been used to
379
+ # generate the world. Servers should always fill out an empty String for this.
380
+ premium_world_template_id: string
381
+ # Specifies if the world was a trial world, meaning features are limited and there
382
+ # is a time limit on the world.
383
+ is_trial: bool
384
+
385
+ # MovementType specifies the way the server handles player movement. Available options are
386
+ # packet.AuthoritativeMovementModeClient, packet.AuthoritativeMovementModeServer and
387
+ # packet.AuthoritativeMovementModeServerWithRewind, where server the server authoritative types result
388
+ # in the client sending PlayerAuthInput packets instead of MovePlayer packets and the rewind mode
389
+ # requires sending the tick of movement and several actions.
390
+ #
391
+ # Specifies if the client or server is authoritative over the movement of the player,
392
+ # meaning it controls the movement of it.
393
+ ## https://github.com/pmmp/PocketMine-MP/blob/a43b46a93cb127f037c879b5d8c29cda251dd60c/src/pocketmine/network/mcpe/protocol/types/PlayerMovementType.php#L26
394
+ movement_authority: zigzag32 =>
395
+ 0: client
396
+ 1: server
397
+ # PlayerAuthInputPacket + a bunch of junk that solves a nonexisting problem
398
+ 2: server_with_rewind
399
+ # RewindHistorySize is the amount of history to keep at maximum if MovementType is
400
+ # packet.AuthoritativeMovementModeServerWithRewind.
401
+ rewind_history_size: zigzag32
402
+ # ServerAuthoritativeBlockBreaking specifies if block breaking should be sent through
403
+ # packet.PlayerAuthInput or not. This field is somewhat redundant as it is always enabled if
404
+ # MovementType is packet.AuthoritativeMovementModeServer or
405
+ # packet.AuthoritativeMovementModeServerWithRewind
406
+ server_authoritative_block_breaking: bool
407
+
408
+ # The total time in ticks that has elapsed since the start of the world.
409
+ current_tick: li64
410
+ # The seed used to seed the random used to produce enchantments in the enchantment table.
411
+ # Note that the exact correct random implementation must be used to produce the correct
412
+ # results both client- and server-side.
413
+ enchantment_seed: zigzag32
414
+
415
+ # BlockProperties is a list of all the custom blocks registered on the server.
416
+ block_properties: BlockProperties
417
+ # A list of all items with their legacy IDs which are available in the game.
418
+ # Failing to send any of the items that are in the game will crash mobile clients.
419
+ itemstates: Itemstates
420
+ # A unique ID specifying the multi-player session of the player.
421
+ # A random UUID should be filled out for this field.
422
+ multiplayer_correlation_id: string
423
+ # ServerAuthoritativeInventory specifies if the server authoritative inventory system is enabled. This
424
+ # is a new system introduced in 1.16. Backwards compatibility with the inventory transactions has to
425
+ # some extent been preserved, but will eventually be removed.
426
+ server_authoritative_inventory: bool
427
+ # The server's engine version, used for telemetry
428
+ engine: string
429
+ # PropertyData contains properties that should be applied on the player. These properties are the same as the
430
+ # ones that are sent in the SyncActorProperty packet.
431
+ property_data: nbt
432
+ # A checksum to ensure block types between the server and client match
433
+ block_pallette_checksum: lu64
434
+ # WorldTemplateID is a UUID that identifies the template that was used to generate the world. Servers that do not
435
+ # use a world based off of a template can set this to an empty UUID.
436
+ world_template_id: uuid
437
+ # ClientSideGeneration is true if the client should use the features registered in the FeatureRegistry packet to
438
+ # generate terrain client-side to save on bandwidth.
439
+ client_side_generation: bool
440
+ # UseBlockNetworkIDHashes is true if the client should use the hash of a block's name as its network ID rather than
441
+ # its index in the expected block palette. This is useful for servers that wish to support multiple protocol versions
442
+ # and custom blocks, but it will result in extra bytes being written for every block in a sub chunk palette.
443
+ block_network_ids_are_hashes: bool
444
+ server_controlled_sound: bool
445
+
446
+ packet_add_player:
447
+ !id: 0x0c
448
+ !bound: client
449
+ # UUID is the UUID of the player. It is the same UUID that the client sent in the
450
+ # Login packet at the start of the session. A player with this UUID must exist
451
+ # in the player list (built up using the Player List packet) for it to show up in-game.
452
+ uuid: uuid
453
+ # Username is the name of the player. This username is the username that will be
454
+ # set as the initial name tag of the player.
455
+ username: string
456
+ # The runtime ID of the player. The runtime ID is unique for each world session,
457
+ # and entities are generally identified in packets using this runtime ID.
458
+ runtime_id: varint64
459
+ # An identifier only set for particular platforms when chatting (presumably only for
460
+ # Nintendo Switch). It is otherwise an empty string, and is used to decide which players
461
+ # are able to chat with each other.
462
+ platform_chat_id: string
463
+ # Position is the position to spawn the player on. If the player is on a distance that the viewer cannot
464
+ # see it, the player will still show up if the viewer moves closer.
465
+ position: vec3f
466
+ # Velocity is the initial velocity the player spawns with. This velocity will initiate client side
467
+ # movement of the player.
468
+ velocity: vec3f
469
+ # Pitch is the vertical rotation of the player. Facing straight forward yields a pitch of 0. Pitch is
470
+ # measured in degrees.
471
+ pitch: lf32
472
+ # Yaw is the horizontal rotation of the player. Yaw is also measured in degrees.
473
+ yaw: lf32
474
+ # HeadYaw is the same as Yaw, except that it applies specifically to the head of the player. A different
475
+ # value for HeadYaw than Yaw means that the player will have its head turned.
476
+ head_yaw: lf32
477
+ # HeldItem is the item that the player is holding. The item is shown to the viewer as soon as the player
478
+ # itself shows up. Needless to say that this field is rather pointless, as additional packets still must
479
+ # be sent for armour to show up.
480
+ held_item: Item
481
+ # GameType is the game type of the player. If set to GameTypeSpectator, the player will not be shown to viewers.
482
+ gamemode: GameMode
483
+ # EntityMetadata is a map of entity metadata, which includes flags and data properties that alter in
484
+ # particular the way the player looks. Flags include ones such as 'on fire' and 'sprinting'.
485
+ # The metadata values are indexed by their property key.
486
+ metadata: MetadataDictionary
487
+ # EntityProperties holds lists of entity properties that define specific attributes of an entity. As of v1.19.40, the
488
+ # vanilla server does not use these properties, however they are still supported by the protocol.
489
+ properties: EntityProperties
490
+ # The unique ID of the player. The unique ID is a value that remains consistent
491
+ # across different sessions of the same world, but most unoffical servers simply
492
+ # fill the runtime ID of the player out for this field.
493
+ unique_id: li64
494
+ permission_level: PermissionLevel
495
+ command_permission: CommandPermissionLevel
496
+ # AbilityLayer represents the abilities of a specific layer, such as the base layer or the spectator layer.
497
+ abilities: AbilityLayers[]u8
498
+ # EntityLinks is a list of entity links that are currently active on the player. These links alter the
499
+ # way the player shows up when first spawned in terms of it shown as riding an entity. Setting these
500
+ # links is important for new viewers to see the player is riding another entity.
501
+ links: Links
502
+ # DeviceID is the device ID set in one of the files found in the storage of the device of the player. It
503
+ # may be changed freely, so it should not be relied on for anything.
504
+ device_id: string
505
+ # BuildPlatform is the build platform/device OS of the player that is about to be added, as it sent in
506
+ # the Login packet when joining.
507
+ device_os: DeviceOS
508
+
509
+ packet_add_entity:
510
+ !id: 0x0d
511
+ !bound: client
512
+ # EntityUniqueID is the unique ID of the entity. The unique ID is a value that remains consistent across
513
+ # different sessions of the same world, but most servers simply fill the runtime ID of the entity out for
514
+ unique_id: zigzag64
515
+ # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and
516
+ # entities are generally identified in packets using this runtime ID.
517
+ runtime_id: varint64
518
+ # EntityType is the string entity type of the entity, for example 'minecraft:skeleton'. A list of these
519
+ # entities may be found online.
520
+ entity_type: string
521
+ # Position is the position to spawn the entity on. If the entity is on a distance that the player cannot
522
+ # see it, the entity will still show up if the player moves closer.
523
+ position: vec3f
524
+ # Velocity is the initial velocity the entity spawns with. This velocity will initiate client side
525
+ # movement of the entity.
526
+ velocity: vec3f
527
+ # Pitch is the vertical rotation of the entity. Facing straight forward yields a pitch of 0. Pitch is
528
+ # measured in degrees.
529
+ pitch: lf32
530
+ # Yaw is the horizontal rotation of the entity. Yaw is also measured in degrees.
531
+ yaw: lf32
532
+ # HeadYaw is the same as Yaw, except that it applies specifically to the head of the entity. A different value for
533
+ # HeadYaw than Yaw means that the entity will have its head turned.
534
+ head_yaw: lf32
535
+ # BodyYaw is the same as Yaw, except that it applies specifically to the body of the entity. A different value for
536
+ # BodyYaw than HeadYaw means that the entity will have its body turned, although it is unclear what the difference
537
+ # between BodyYaw and Yaw is.
538
+ body_yaw: lf32
539
+ # Attributes is a slice of attributes that the entity has. It includes attributes such as its health,
540
+ # movement speed, etc.
541
+ attributes: EntityAttributes
542
+ # EntityMetadata is a map of entity metadata, which includes flags and data properties that alter in
543
+ # particular the way the entity looks. Flags include ones such as 'on fire' and 'sprinting'.
544
+ # The metadata values are indexed by their property key.
545
+ metadata: MetadataDictionary
546
+ # EntityProperties holds lists of entity properties that define specific attributes of an entity. As of v1.19.40, the
547
+ # vanilla server does not use these properties, however they are still supported by the protocol.
548
+ properties: EntityProperties
549
+ # EntityLinks is a list of entity links that are currently active on the entity. These links alter the
550
+ # way the entity shows up when first spawned in terms of it shown as riding an entity. Setting these
551
+ # links is important for new viewers to see the entity is riding another entity.
552
+ links: Links
553
+
554
+ packet_remove_entity:
555
+ !id: 0x0e
556
+ !bound: client
557
+ entity_id_self: zigzag64
558
+
559
+ packet_add_item_entity:
560
+ !id: 0x0f
561
+ !bound: client
562
+ entity_id_self: zigzag64
563
+ runtime_entity_id: varint64
564
+ item: Item
565
+ position: vec3f
566
+ velocity: vec3f
567
+ metadata: MetadataDictionary
568
+ is_from_fishing: bool
569
+
570
+ packet_take_item_entity:
571
+ !id: 0x11
572
+ !bound: client
573
+ runtime_entity_id: varint64
574
+ target: varint
575
+
576
+ # MoveActorAbsolute is sent by the server to move an entity to an absolute position. It is typically used
577
+ # for movements where high accuracy isn't needed, such as for long range teleporting.
578
+ packet_move_entity:
579
+ !id: 0x12
580
+ !bound: both
581
+ # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and
582
+ # entities are generally identified in packets using this runtime ID.
583
+ runtime_entity_id: varint64
584
+ # Flags is a combination of flags that specify details of the movement. It is a combination of the flags
585
+ # above.
586
+ flags: u8
587
+ # Position is the position to spawn the entity on. If the entity is on a distance that the player cannot
588
+ # see it, the entity will still show up if the player moves closer.
589
+ position: vec3f
590
+ # Rotation is a Vec3 holding the X, Y and Z rotation of the entity after the movement. This is a Vec3 for
591
+ # the reason that projectiles like arrows don't have yaw/pitch, but do have roll.
592
+ rotation: Rotation
593
+
594
+ # MovePlayer is sent by players to send their movement to the server, and by the server to update the
595
+ # movement of player entities to other players.
596
+ packet_move_player:
597
+ !id: 0x13
598
+ !bound: both
599
+ # EntityRuntimeID is the runtime ID of the player. The runtime ID is unique for each world session, and
600
+ # entities are generally identified in packets using this runtime ID.
601
+ runtime_id: varint
602
+ # Position is the position to spawn the player on. If the player is on a distance that the viewer cannot
603
+ # see it, the player will still show up if the viewer moves closer.
604
+ position: vec3f
605
+ # Pitch is the vertical rotation of the player. Facing straight forward yields a pitch of 0. Pitch is
606
+ # measured in degrees.
607
+ pitch: lf32
608
+ # Yaw is the horizontal rotation of the player. Yaw is also measured in degrees
609
+ yaw: lf32
610
+ # HeadYaw is the same as Yaw, except that it applies specifically to the head of the player. A different
611
+ # value for HeadYaw than Yaw means that the player will have its head turned
612
+ head_yaw: lf32
613
+ # Mode is the mode of the movement. It specifies the way the player's movement should be shown to other
614
+ # players. It is one of the constants below.
615
+ mode: u8 =>
616
+ 0: normal
617
+ 1: reset
618
+ 2: teleport
619
+ 3: rotation
620
+ # OnGround specifies if the player is considered on the ground. Note that proxies or hacked clients could
621
+ # fake this to always be true, so it should not be taken for granted.
622
+ on_ground: bool
623
+ # RiddenEntityRuntimeID is the runtime ID of the entity that the player might currently be riding. If not
624
+ # riding, this should be left 0.
625
+ ridden_runtime_id: varint
626
+ teleport: mode ?
627
+ if teleport:
628
+ # TeleportCause is written only if Mode is MoveModeTeleport. It specifies the cause of the teleportation,
629
+ # which is one of the constants above.
630
+ cause: li32 =>
631
+ 0: unknown
632
+ 1: projectile
633
+ 2: chorus_fruit
634
+ 3: command
635
+ 4: behavior
636
+ # TeleportSourceEntityType is the entity type that caused the teleportation, for example an ender pearl.
637
+ # TODO: is this still a integer and not a string?
638
+ source_entity_type: LegacyEntityType
639
+ tick: varint64
640
+
641
+ packet_rider_jump:
642
+ !id: 0x14
643
+ !bound: both
644
+ jump_strength: zigzag32
645
+
646
+ # UpdateBlock is sent by the server to update a block client-side, without resending the entire chunk that
647
+ # the block is located in. It is particularly useful for small modifications like block breaking/placing.
648
+ packet_update_block:
649
+ !id: 0x15
650
+ !bound: client
651
+ # Position is the block position at which a block is updated.
652
+ position: BlockCoordinates
653
+ # NewBlockRuntimeID is the runtime ID of the block that is placed at Position after sending the packet
654
+ # to the client.
655
+ block_runtime_id: varint
656
+ # Flags is a combination of flags that specify the way the block is updated client-side. It is a
657
+ # combination of the flags above, but typically sending only the BlockUpdateNetwork flag is sufficient.
658
+ flags: UpdateBlockFlags
659
+ # Layer is the world layer on which the block is updated. For most blocks, this is the first layer, as
660
+ # that layer is the default layer to place blocks on, but for blocks inside of each other, this differs.
661
+ layer: varint
662
+
663
+
664
+ UpdateBlockFlags: [ "bitflags",
665
+ {
666
+ "type": "varint",
667
+ "flags": {
668
+ "neighbors": 1,
669
+ "network": 2,
670
+ "no_graphic": 0b100,
671
+ "unused": 0b1000,
672
+ "priority": 0b10000,
673
+ }
674
+ }
675
+ ]
676
+
677
+ packet_add_painting:
678
+ !id: 0x16
679
+ !bound: client
680
+ entity_id_self: zigzag64
681
+ runtime_entity_id: varint64
682
+ coordinates: vec3f
683
+ direction: zigzag32
684
+ title: string
685
+
686
+ # TickSync is sent by the client and the server to maintain a synchronized, server-authoritative tick between
687
+ # the client and the server. The client sends this packet first, and the server should reply with another one
688
+ # of these packets, including the response time.
689
+ packet_tick_sync:
690
+ !id: 0x17
691
+ !bound: both
692
+ # ClientRequestTimestamp is the timestamp on which the client sent this packet to the server. The server
693
+ # should fill out that same value when replying.
694
+ # The ClientRequestTimestamp is always 0
695
+ request_time: li64
696
+ # ServerReceptionTimestamp is the timestamp on which the server received the packet sent by the client.
697
+ # When the packet is sent by the client, this value is 0.
698
+ # ServerReceptionTimestamp is generally the current tick of the server. It isn't an actual timestamp, as
699
+ # the field implies
700
+ response_time: li64
701
+
702
+ packet_level_sound_event_old:
703
+ !id: 0x18
704
+ !bound: both
705
+ sound_id: u8
706
+ position: vec3f
707
+ block_id: zigzag32
708
+ entity_type: zigzag32
709
+ is_baby_mob: bool
710
+ is_global: bool
711
+
712
+ packet_level_event:
713
+ !id: 0x19
714
+ !bound: client
715
+ event: zigzag32 =>
716
+ 1000: sound_click
717
+ 1001: sound_click_fail
718
+ 1002: sound_shoot
719
+ 1003: sound_door
720
+ 1004: sound_fizz
721
+ 1005: sound_ignite
722
+ 1007: sound_ghast
723
+ 1008: sound_ghast_shoot
724
+ 1009: sound_blaze_shoot
725
+ 1010: sound_door_bump
726
+ 1012: sound_door_crash
727
+ 1018: sound_enderman_teleport
728
+ 1020: sound_anvil_break
729
+ 1021: sound_anvil_use
730
+ 1022: sound_anvil_fall
731
+ 1030: sound_pop
732
+ 1032: sound_portal
733
+ 1040: sound_itemframe_add_item
734
+ 1041: sound_itemframe_remove
735
+ 1042: sound_itemframe_place
736
+ 1043: sound_itemframe_remove_item
737
+ 1044: sound_itemframe_rotate_item
738
+ 1050: sound_camera
739
+ 1051: sound_orb
740
+ 1052: sound_totem
741
+ 1060: sound_armor_stand_break
742
+ 1061: sound_armor_stand_hit
743
+ 1062: sound_armor_stand_fall
744
+ 1063: sound_armor_stand_place
745
+ 1064: pointed_dripstone_land
746
+ 1065: dye_used
747
+ 1066: ink_sack_used
748
+ 2000: particle_shoot #TODO: check 2000-2017
749
+ 2001: particle_destroy
750
+ 2002: particle_splash
751
+ 2003: particle_eye_despawn
752
+ 2004: particle_spawn
753
+ 2005: particle_crop_growth
754
+ 2006: particle_guardian_curse
755
+ 2007: particle_death_smoke
756
+ 2008: particle_block_force_field
757
+ 2009: particle_projectile_hit
758
+ 2010: particle_dragon_egg_teleport
759
+ 2011: particle_crop_eaten
760
+ 2012: particle_critical
761
+ 2013: particle_enderman_teleport
762
+ 2014: particle_punch_block
763
+ 2015: particle_bubble
764
+ 2016: particle_evaporate
765
+ 2017: particle_destroy_armor_stand
766
+ 2018: particle_breaking_egg
767
+ 2019: particle_destroy_egg
768
+ 2020: particle_evaporate_water
769
+ 2021: particle_destroy_block_no_sound
770
+ 2022: particle_knockback_roar
771
+ 2023: particle_teleport_trail
772
+ 2024: particle_point_cloud
773
+ 2025: particle_explosion
774
+ 2026: particle_block_explosion
775
+ 2027: particle_vibration_signal
776
+ 2028: particle_dripstone_drip
777
+ 2029: particle_fizz_effect
778
+ 2030: particle_wax_on
779
+ 2031: particle_wax_off
780
+ 2032: particle_scrape
781
+ 2033: particle_electric_spark
782
+ 2034: particle_turtle_egg
783
+ 2035: particle_sculk_shriek
784
+ 2036: sculk_catalyst_bloom
785
+ 2037: sculk_charge
786
+ 2038: sculk_charge_pop
787
+ 2039: sonic_explosion
788
+
789
+ 3001: start_rain
790
+ 3002: start_thunder
791
+ 3003: stop_rain
792
+ 3004: stop_thunder
793
+ 3005: pause_game #data: 1 to pause, 0 to resume
794
+ 3006: pause_game_no_screen #data: 1 to pause, 0 to resume - same effect as normal pause but without screen
795
+ 3007: set_game_speed #x coordinate of pos = scale factor (default 1.0)
796
+ 3500: redstone_trigger
797
+ 3501: cauldron_explode
798
+ 3502: cauldron_dye_armor
799
+ 3503: cauldron_clean_armor
800
+ 3504: cauldron_fill_potion
801
+ 3505: cauldron_take_potion
802
+ 3506: cauldron_fill_water
803
+ 3507: cauldron_take_water
804
+ 3508: cauldron_add_dye
805
+ 3509: cauldron_clean_banner
806
+ 3600: block_start_break
807
+ 3601: block_stop_break
808
+ 3602: block_break_speed
809
+ 3603: particle_punch_block_down
810
+ 3604: particle_punch_block_up
811
+ 3605: particle_punch_block_north
812
+ 3606: particle_punch_block_south
813
+ 3607: particle_punch_block_west
814
+ 3608: particle_punch_block_east
815
+ 4000: set_data
816
+ 9800: players_sleeping
817
+ 9801: sleeping_players
818
+ 0x4000: add_particle_mask
819
+ # 0x4000 | + particle ID
820
+ 16385: add_particle_bubble # 1
821
+ 16386: add_particle_bubble_manual # 2
822
+ 16387: add_particle_critical # 3
823
+ 16388: add_particle_block_force_field # 4
824
+ 16389: add_particle_smoke # 5
825
+ 16390: add_particle_explode # 6
826
+ 16391: add_particle_evaporation # 7
827
+ 16392: add_particle_flame # 8
828
+ 16393: add_particle_candle_flame # 9
829
+ 16394: add_particle_lava # 10
830
+ 16395: add_particle_large_smoke # 11
831
+ 16396: add_particle_redstone # 12
832
+ 16397: add_particle_rising_red_dust # 13
833
+ 16398: add_particle_item_break # 14
834
+ 16399: add_particle_snowball_poof # 15
835
+ 16400: add_particle_huge_explode # 16
836
+ 16401: add_particle_huge_explode_seed # 17
837
+ 16402: add_particle_mob_flame # 18
838
+ 16403: add_particle_heart # 19
839
+ 16404: add_particle_terrain # 20
840
+ 16405: add_particle_town_aura # 21
841
+ 16406: add_particle_portal # 22
842
+ 16408: add_particle_water_splash # 24
843
+ 16409: add_particle_water_splash_manual # 25
844
+ 16410: add_particle_water_wake # 26
845
+ 16411: add_particle_drip_water # 27
846
+ 16412: add_particle_drip_lava # 28
847
+ 16413: add_particle_drip_honey # 29
848
+ 16414: add_particle_stalactite_drip_water # 30
849
+ 16415: add_particle_stalactite_drip_lava # 31
850
+ 16416: add_particle_falling_dust # 32
851
+ 16417: add_particle_mob_spell # 33
852
+ 16418: add_particle_mob_spell_ambient # 34
853
+ 16419: add_particle_mob_spell_instantaneous # 35
854
+ 16420: add_particle_ink # 36
855
+ 16421: add_particle_slime # 37
856
+ 16422: add_particle_rain_splash # 38
857
+ 16423: add_particle_villager_angry # 39
858
+ 16424: add_particle_villager_happy # 40
859
+ 16425: add_particle_enchantment_table # 41
860
+ 16426: add_particle_tracking_emitter # 42
861
+ 16427: add_particle_note # 43
862
+ 16428: add_particle_witch_spell # 44
863
+ 16429: add_particle_carrot # 45
864
+ 16430: add_particle_mob_appearance # 46
865
+ 16431: add_particle_end_rod # 47
866
+ 16432: add_particle_dragons_breath # 48
867
+ 16433: add_particle_spit # 49
868
+ 16434: add_particle_totem # 50
869
+ 16435: add_particle_food # 51
870
+ 16436: add_particle_fireworks_starter # 52
871
+ 16437: add_particle_fireworks_spark # 53
872
+ 16438: add_particle_fireworks_overlay # 54
873
+ 16439: add_particle_balloon_gas # 55
874
+ 16440: add_particle_colored_flame # 56
875
+ 16441: add_particle_sparkler # 57
876
+ 16442: add_particle_conduit # 58
877
+ 16443: add_particle_bubble_column_up # 59
878
+ 16444: add_particle_bubble_column_down # 60
879
+ 16445: add_particle_sneeze # 61
880
+ 16446: add_particle_shulker_bullet # 62
881
+ 16447: add_particle_bleach # 63
882
+ 16448: add_particle_dragon_destroy_block # 64
883
+ 16449: add_particle_mycelium_dust # 65
884
+ 16450: add_particle_falling_red_dust # 66
885
+ 16451: add_particle_campfire_smoke # 67
886
+ 16452: add_particle_tall_campfire_smoke # 68
887
+ 16453: add_particle_dragon_breath_fire # 69
888
+ 16454: add_particle_dragon_breath_trail # 70
889
+ 16455: add_particle_blue_flame # 71
890
+ 16456: add_particle_soul # 72
891
+ 16457: add_particle_obsidian_tear # 73
892
+ 16458: add_particle_portal_reverse # 74
893
+ 16459: add_particle_snowflake # 75
894
+ 16460: add_particle_vibration_signal # 76
895
+ 16461: add_particle_sculk_sensor_redstone # 77
896
+ 16462: add_particle_spore_blossom_shower # 78
897
+ 16463: add_particle_spore_blossom_ambient # 79
898
+ 16464: add_particle_wax # 80
899
+ 16465: add_particle_electric_spark # 81
900
+ position: vec3f
901
+ data: zigzag32
902
+
903
+ packet_block_event:
904
+ !id: 0x1a
905
+ !bound: client
906
+ # Position is the position of the block that an event occurred at.
907
+ position: BlockCoordinates
908
+ # EventType is the type of the block event.
909
+ # The event type decides the way the event data that follows is used
910
+ type: zigzag32 =>
911
+ 0: sound
912
+ 1: change_state
913
+ # EventData holds event type specific data. For chests for example,
914
+ # opening the chest means the data must be 1
915
+ data: zigzag32
916
+
917
+ packet_entity_event:
918
+ !id: 0x1b
919
+ !bound: both
920
+ runtime_entity_id: varint64
921
+ event_id: u8 =>
922
+ 1: jump
923
+ 2: hurt_animation
924
+ 3: death_animation
925
+ 4: arm_swing
926
+ 5: stop_attack
927
+ 6: tame_fail
928
+ 7: tame_success
929
+ 8: shake_wet
930
+ 9: use_item
931
+ 10: eat_grass_animation
932
+ 11: fish_hook_bubble
933
+ 12: fish_hook_position
934
+ 13: fish_hook_hook
935
+ 14: fish_hook_tease
936
+ 15: squid_ink_cloud
937
+ 16: zombie_villager_cure
938
+ 18: respawn
939
+ 19: iron_golem_offer_flower
940
+ 20: iron_golem_withdraw_flower
941
+ 21: love_particles #breeding
942
+ 22: villager_angry
943
+ 23: villager_happy
944
+ 24: witch_spell_particles
945
+ 25: firework_particles
946
+ 26: in_love_particles
947
+ 27: silverfish_spawn_animation
948
+ 28: guardian_attack
949
+ 29: witch_drink_potion
950
+ 30: witch_throw_potion
951
+ 31: minecart_tnt_prime_fuse
952
+ 32: creeper_prime_fuse
953
+ 33: air_supply_expired
954
+ 34: player_add_xp_levels
955
+ 35: elder_guardian_curse
956
+ 36: agent_arm_swing
957
+ 37: ender_dragon_death
958
+ 38: dust_particles #not sure what this is
959
+ 39: arrow_shake
960
+
961
+ 57: eating_item
962
+
963
+ 60: baby_animal_feed #green particles, like bonemeal on crops
964
+ 61: death_smoke_cloud
965
+ 62: complete_trade
966
+ 63: remove_leash #data 1 = cut leash
967
+ 64: caravan
968
+ 65: consume_totem
969
+ 66: player_check_treasure_hunter_achievement #mojang...
970
+ 67: entity_spawn #used for MinecraftEventing stuff, not needed
971
+ 68: dragon_puke #they call this puke particles
972
+ 69: item_entity_merge
973
+ 70: start_swim
974
+ 71: balloon_pop
975
+ 72: treasure_hunt
976
+ 73: agent_summon
977
+ 74: charged_item
978
+ 75: fall
979
+ 76: grow_up
980
+ 77: vibration_detected
981
+ 78: drink_milk
982
+ data: zigzag32
983
+
984
+ packet_mob_effect:
985
+ !id: 0x1c
986
+ !bound: client
987
+ runtime_entity_id: varint64
988
+ event_id: u8 =>
989
+ 1: add
990
+ 2: update
991
+ 3: remove
992
+ effect_id: zigzag32
993
+ amplifier: zigzag32
994
+ particles: bool
995
+ duration: zigzag32
996
+
997
+ packet_update_attributes:
998
+ !id: 0x1d
999
+ !bound: client
1000
+ runtime_entity_id: varint64
1001
+ attributes: PlayerAttributes
1002
+ tick: varint64
1003
+
1004
+ # InventoryTransaction is a packet sent by the client. It essentially exists out of multiple sub-packets,
1005
+ # each of which have something to do with the inventory in one way or another. Some of these sub-packets
1006
+ # directly relate to the inventory, others relate to interaction with the world, that could potentially
1007
+ # result in a change in the inventory.
1008
+ packet_inventory_transaction:
1009
+ !id: 0x1e
1010
+ !bound: both
1011
+ transaction: Transaction
1012
+
1013
+ packet_mob_equipment:
1014
+ !id: 0x1f
1015
+ !bound: both
1016
+ runtime_entity_id: varint64
1017
+ item: Item
1018
+ slot: u8
1019
+ selected_slot: u8
1020
+ window_id: WindowID
1021
+
1022
+ packet_mob_armor_equipment:
1023
+ !id: 0x20
1024
+ !bound: both
1025
+ runtime_entity_id: varint64
1026
+ helmet: Item
1027
+ chestplate: Item
1028
+ leggings: Item
1029
+ boots: Item
1030
+
1031
+ # Interact is sent by the client when it interacts with another entity in some way. It used to be used for
1032
+ # normal entity and block interaction, but this is no longer the case now.
1033
+ packet_interact:
1034
+ !id: 0x21
1035
+ !bound: both
1036
+ # Action type is the ID of the action that was executed by the player. It is one of the constants that
1037
+ # may be found above.
1038
+ action_id: u8 =>
1039
+ 3: leave_vehicle
1040
+ 4: mouse_over_entity
1041
+ 5: npc_open
1042
+ 6: open_inventory
1043
+ # TargetEntityRuntimeID is the runtime ID of the entity that the player interacted with. This is empty
1044
+ # for the InteractActionOpenInventory action type.
1045
+ target_entity_id: varint64
1046
+ # Position associated with the ActionType above. For the InteractActionMouseOverEntity, this is the
1047
+ # position relative to the entity moused over over which the player hovered with its mouse/touch. For the
1048
+ # InteractActionLeaveVehicle, this is the position that the player spawns at after leaving the vehicle.
1049
+ position: action_id ?
1050
+ if mouse_over_entity or leave_vehicle: vec3f
1051
+
1052
+ packet_block_pick_request:
1053
+ !id: 0x22
1054
+ !bound: server
1055
+ x: zigzag32
1056
+ y: zigzag32
1057
+ z: zigzag32
1058
+ add_user_data: bool
1059
+ selected_slot: u8
1060
+
1061
+ packet_entity_pick_request:
1062
+ !id: 0x23
1063
+ !bound: server
1064
+ runtime_entity_id: lu64
1065
+ selected_slot: u8
1066
+ # WithData is true if the pick request requests the entity metadata.
1067
+ with_data: bool
1068
+
1069
+ # PlayerAction is sent by the client when it executes any action, for example starting to sprint, swim,
1070
+ # starting the breaking of a block, dropping an item, etc.
1071
+ packet_player_action:
1072
+ !id: 0x24
1073
+ !bound: server
1074
+ # EntityRuntimeID is the runtime ID of the player. The runtime ID is unique for each world session, and
1075
+ # entities are generally identified in packets using this runtime ID.
1076
+ runtime_entity_id: varint64
1077
+ # ActionType is the ID of the action that was executed by the player. It is one of the constants that may
1078
+ # be found above.
1079
+ action: Action
1080
+ # BlockPosition is the position of the target block, if the action with the ActionType set concerned a
1081
+ # block. If that is not the case, the block position will be zero.
1082
+ position: BlockCoordinates
1083
+ # ResultPosition is the position of the action's result. When a UseItemOn action is sent, this is the position of
1084
+ # the block clicked, but when a block is placed, this is the position at which the block will be placed.
1085
+ result_position: BlockCoordinates
1086
+ # BlockFace is the face of the target block that was touched. If the action with the ActionType set
1087
+ # concerned a block. If not, the face is always 0.
1088
+ face: zigzag32
1089
+
1090
+ packet_hurt_armor:
1091
+ !id: 0x26
1092
+ !bound: client
1093
+ cause: zigzag32
1094
+ damage: zigzag32
1095
+ armor_slots: zigzag64
1096
+
1097
+ packet_set_entity_data:
1098
+ !id: 0x27
1099
+ !bound: both
1100
+ runtime_entity_id: varint64
1101
+ metadata: MetadataDictionary
1102
+ # EntityProperties holds lists of entity properties that define specific attributes of an entity. As of v1.19.40, the
1103
+ # vanilla server does not use these properties, however they are still supported by the protocol.
1104
+ properties: EntityProperties
1105
+ tick: varint64
1106
+
1107
+ # SetActorMotion is sent by the server to change the client-side velocity of an entity. It is usually used
1108
+ # in combination with server-side movement calculation.
1109
+ packet_set_entity_motion:
1110
+ !id: 0x28
1111
+ !bound: both
1112
+ # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and
1113
+ # entities are generally identified in packets using this runtime ID.
1114
+ runtime_entity_id: varint64
1115
+ # Velocity is the new velocity the entity gets. This velocity will initiate the client-side movement of
1116
+ # the entity.
1117
+ velocity: vec3f
1118
+
1119
+ # SetActorLink is sent by the server to initiate an entity link client-side, meaning one entity will start
1120
+ # riding another.
1121
+ packet_set_entity_link:
1122
+ !id: 0x29
1123
+ !bound: client
1124
+ link: Link
1125
+
1126
+ packet_set_health:
1127
+ !id: 0x2a
1128
+ !bound: client
1129
+ health: zigzag32
1130
+
1131
+ packet_set_spawn_position:
1132
+ !id: 0x2b
1133
+ !bound: client
1134
+ spawn_type: zigzag32 =>
1135
+ 0: player
1136
+ 1: world
1137
+ player_position: BlockCoordinates
1138
+ dimension: zigzag32
1139
+ world_position: BlockCoordinates
1140
+
1141
+ packet_animate:
1142
+ !id: 0x2c
1143
+ !bound: both
1144
+ action_id: zigzag32 =>
1145
+ 0: none
1146
+ 1: swing_arm
1147
+ 2: unknown
1148
+ 3: wake_up
1149
+ 4: critical_hit
1150
+ 5: magic_critical_hit
1151
+ 128: row_right
1152
+ 129: row_left
1153
+ runtime_entity_id: varint64
1154
+ _: action_id ?
1155
+ if row_right or row_left:
1156
+ boat_rowing_time: lf32
1157
+
1158
+ packet_respawn:
1159
+ !id: 0x2d
1160
+ !bound: both
1161
+ position: vec3f
1162
+ state: u8
1163
+ runtime_entity_id: varint64
1164
+
1165
+ # ContainerOpen is sent by the server to open a container client-side. This container must be physically
1166
+ # present in the world, for the packet to have any effect. Unlike Java Edition, Bedrock Edition requires that
1167
+ # chests for example must be present and in range to open its inventory.
1168
+ packet_container_open:
1169
+ !id: 0x2e
1170
+ !bound: client
1171
+ # WindowID is the ID representing the window that is being opened. It may be used later to close the
1172
+ # container using a ContainerClose packet.
1173
+ window_id: WindowID
1174
+ # ContainerType is the type ID of the container that is being opened when opening the container at the
1175
+ # position of the packet. It depends on the block/entity, and could, for example, be the window type of
1176
+ # a chest or a hopper, but also a horse inventory.
1177
+ window_type: WindowType
1178
+ # ContainerPosition is the position of the container opened. The position must point to a block entity
1179
+ # that actually has a container. If that is not the case, the window will not be opened and the packet
1180
+ # will be ignored, if a valid ContainerEntityUniqueID has not also been provided.
1181
+ coordinates: BlockCoordinates
1182
+ # ContainerEntityUniqueID is the unique ID of the entity container that was opened. It is only used if
1183
+ # the ContainerType is one that points to an entity, for example a horse.
1184
+ runtime_entity_id: zigzag64
1185
+
1186
+ # ContainerClose is sent by the server to close a container the player currently has opened, which was opened
1187
+ # using the ContainerOpen packet, or by the client to tell the server it closed a particular container, such
1188
+ # as the crafting grid.
1189
+ packet_container_close:
1190
+ !id: 0x2f
1191
+ !bound: both
1192
+ # WindowID is the ID representing the window of the container that should be closed. It must be equal to
1193
+ # the one sent in the ContainerOpen packet to close the designated window.
1194
+ window_id: WindowID
1195
+ # ServerSide determines whether or not the container was force-closed by the server. If this value is
1196
+ # not set correctly, the client may ignore the packet and respond with a PacketViolationWarning.
1197
+ server: bool
1198
+
1199
+ # PlayerHotBar is sent by the server to the client. It used to be used to link hot bar slots of the player to
1200
+ # actual slots in the inventory, but as of 1.2, this was changed and hot bar slots are no longer a free
1201
+ # floating part of the inventory.
1202
+ # Since 1.2, the packet has been re-purposed, but its new functionality is not clear.
1203
+ packet_player_hotbar:
1204
+ !id: 0x30
1205
+ !bound: both
1206
+ selected_slot: varint
1207
+ window_id: WindowID
1208
+ select_slot: bool
1209
+
1210
+ # InventoryContent is sent by the server to update the full content of a particular inventory. It is usually
1211
+ # sent for the main inventory of the player, but also works for other inventories that are currently opened
1212
+ # by the player.
1213
+ packet_inventory_content:
1214
+ !id: 0x31
1215
+ !bound: both
1216
+ # WindowID is the ID that identifies one of the windows that the client currently has opened, or one of
1217
+ # the consistent windows such as the main inventory.
1218
+ window_id: WindowIDVarint
1219
+ # Content is the new content of the inventory. The length of this slice must be equal to the full size of
1220
+ # the inventory window updated.
1221
+ input: ItemStacks
1222
+
1223
+ # InventorySlot is sent by the server to update a single slot in one of the inventory windows that the client
1224
+ # currently has opened. Usually this is the main inventory, but it may also be the off hand or, for example,
1225
+ # a chest inventory.
1226
+ packet_inventory_slot:
1227
+ !id: 0x32
1228
+ !bound: both
1229
+ # WindowID is the ID of the window that the packet modifies. It must point to one of the windows that the
1230
+ # client currently has opened.
1231
+ window_id: WindowIDVarint
1232
+ # Slot is the index of the slot that the packet modifies. The new item will be set to the slot at this
1233
+ # index.
1234
+ slot: varint
1235
+ # NewItem is the item to be put in the slot at Slot. It will overwrite any item that may currently
1236
+ # be present in that slot.
1237
+ item: Item
1238
+
1239
+ # ContainerSetData is sent by the server to update specific data of a single container, meaning a block such
1240
+ # as a furnace or a brewing stand. This data is usually used by the client to display certain features
1241
+ # client-side.
1242
+ packet_container_set_data:
1243
+ !id: 0x33
1244
+ !bound: client
1245
+ # WindowID is the ID of the window that should have its data set. The player must have a window open with
1246
+ # the window ID passed, or nothing will happen.
1247
+ window_id: WindowID
1248
+ # Key is the key of the property. It is one of the constants that can be found above. Multiple properties
1249
+ # share the same key, but the functionality depends on the type of the container that the data is set to.
1250
+ # IF FURNACE:
1251
+ # 0: furnace_tick_count
1252
+ # 1: furnace_lit_time
1253
+ # 2: furnace_lit_duration
1254
+ # 3: furnace_stored_xp
1255
+ # 4: furnace_fuel_aux
1256
+ # IF BREWING STAND:
1257
+ # 0: brew_time
1258
+ # 1: brew_fuel_amount
1259
+ # 2: brew_fuel_total
1260
+ property: zigzag32
1261
+ # Value is the value of the property. Its use differs per property.
1262
+ value: zigzag32
1263
+
1264
+ packet_crafting_data:
1265
+ !id: 0x34
1266
+ !bound: client
1267
+ recipes: Recipes
1268
+ # PotionContainerChangeRecipes is a list of all recipes to convert a potion from one type to another,
1269
+ # such as from a drinkable potion to a splash potion, or from a splash potion to a lingering potion.
1270
+ potion_type_recipes: PotionTypeRecipes
1271
+ potion_container_recipes: PotionContainerChangeRecipes
1272
+ # MaterialReducers is a list of all material reducers which is used in education edition chemistry.
1273
+ material_reducers: MaterialReducer[]varint
1274
+ # ClearRecipes indicates if all recipes currently active on the client should be cleaned. Doing this
1275
+ # means that the client will have no recipes active by itself: Any CraftingData packets previously sent
1276
+ # will also be discarded, and only the recipes in this CraftingData packet will be used.
1277
+ clear_recipes: bool
1278
+
1279
+ # CraftingEvent is sent by the client when it crafts a particular item. Note that this packet may be fully
1280
+ # ignored, as the InventoryTransaction packet provides all the information required.
1281
+ packet_crafting_event:
1282
+ !id: 0x35
1283
+ !bound: both
1284
+ # WindowID is the ID representing the window that the player crafted in.
1285
+ window_id: WindowID
1286
+ # CraftingType is a type that indicates the way the crafting was done, for example if a crafting table
1287
+ # was used.
1288
+ recipe_type: zigzag32 =>
1289
+ 0: inventory
1290
+ 1: crafting
1291
+ 2: workbench
1292
+ # RecipeUUID is the UUID of the recipe that was crafted. It points to the UUID of the recipe that was
1293
+ # sent earlier in the CraftingData packet.
1294
+ recipe_id: uuid
1295
+ # Input is a list of items that the player put into the recipe so that it could create the Output items.
1296
+ # These items are consumed in the process.
1297
+ input: Item[]varint
1298
+ # Output is a list of items that were obtained as a result of crafting the recipe.
1299
+ result: Item[]varint
1300
+
1301
+ # GUIDataPickItem is sent by the server to make the client 'select' a hot bar slot. It currently appears to
1302
+ # be broken however, and does not actually set the selected slot to the hot bar slot set in the packet.
1303
+ packet_gui_data_pick_item:
1304
+ !id: 0x36
1305
+ !bound: client
1306
+ # ItemName is the name of the item that shows up in the top part of the popup that shows up when
1307
+ # selecting an item. It is shown as if an item was selected by the player itself.
1308
+ item_name: string
1309
+ # ItemEffects is the line under the ItemName, where the effects of the item are usually situated.
1310
+ item_effects: string
1311
+ # HotBarSlot is the hot bar slot to be selected/picked. This does not currently work, so it does not
1312
+ # matter what number this is.
1313
+ hotbar_slot: li32
1314
+
1315
+ # AdventureSettings is sent by the server to update game-play related features, in particular permissions to
1316
+ # access these features for the client. It includes allowing the player to fly, build and mine, and attack
1317
+ # entities. Most of these flags should be checked server-side instead of using this packet only.
1318
+ # The client may also send this packet to the server when it updates one of these settings through the
1319
+ # in-game settings interface. The server should verify if the player actually has permission to update those
1320
+ # settings.
1321
+ packet_adventure_settings:
1322
+ !id: 0x37
1323
+ !bound: both
1324
+ # Flags is a set of flags that specify certain properties of the player, such as whether or not it can
1325
+ # fly and/or move through blocks. It is one of the AdventureFlag constants above.
1326
+ flags: AdventureFlags
1327
+ # CommandPermissionLevel is a permission level that specifies the kind of commands that the player is
1328
+ # allowed to use.
1329
+ command_permission: CommandPermissionLevelVarint
1330
+ # ActionPermissions is, much like Flags, a set of flags that specify actions that the player is allowed
1331
+ # to undertake, such as whether it is allowed to edit blocks, open doors etc. It is a combination of the
1332
+ # ActionPermission constants above.
1333
+ action_permissions: ActionPermissions
1334
+ # PermissionLevel is the permission level of the player as it shows up in the player list built up using
1335
+ # the PlayerList packet. It is one of the PermissionLevel constants above.
1336
+ permission_level: PermissionLevel
1337
+ # Custom permissions
1338
+ custom_stored_permissions: varint
1339
+ # PlayerUniqueID is a unique identifier of the player. It appears it is not required to fill this field
1340
+ # out with a correct value. Simply writing 0 seems to work.
1341
+ user_id: li64
1342
+
1343
+ AdventureFlags: [ "bitflags",
1344
+ {
1345
+ "type": "varint",
1346
+ "flags": {
1347
+ "world_immutable": 1,
1348
+ "no_pvp": 2,
1349
+ "auto_jump": 0x20,
1350
+ "allow_flight": 0x40,
1351
+ "no_clip": 0x80,
1352
+ "world_builder": 0x100,
1353
+ "flying": 0x200,
1354
+ "muted": 0x400
1355
+ }
1356
+ }
1357
+ ]
1358
+
1359
+ ActionPermissions: [ "bitflags",
1360
+ {
1361
+ "type": "varint",
1362
+ "flags": {
1363
+ "mine": 0x10001,
1364
+ "doors_and_switches": 0x10002,
1365
+ "open_containers": 0x10004,
1366
+ "attack_players": 0x10008,
1367
+ "attack_mobs": 0x10010,
1368
+ "operator": 0x10020,
1369
+ "teleport": 0x10080,
1370
+ "build": 0x10100,
1371
+ "default": 0x10200
1372
+ }
1373
+ }
1374
+ ]
1375
+
1376
+ packet_block_entity_data:
1377
+ !id: 0x38
1378
+ !bound: both
1379
+ position: BlockCoordinates
1380
+ nbt: nbt
1381
+
1382
+ packet_player_input:
1383
+ !id: 0x39
1384
+ !bound: server
1385
+ motion_x: lf32
1386
+ motion_z: lf32
1387
+ jumping: bool
1388
+ sneaking: bool
1389
+
1390
+ # LevelChunk is sent by the server to provide the client with a chunk of a world data (16xYx16 blocks).
1391
+ # Typically a certain amount of chunks is sent to the client before sending it the spawn PlayStatus packet,
1392
+ # so that the client spawns in a loaded world.
1393
+ packet_level_chunk:
1394
+ !id: 0x3a
1395
+ !bound: client
1396
+ # ChunkX is the X coordinate of the chunk sent. (To translate a block's X to a chunk's X: x >> 4)
1397
+ x: zigzag32
1398
+ # ChunkZ is the Z coordinate of the chunk sent. (To translate a block's Z to a chunk's Z: z >> 4)
1399
+ z: zigzag32
1400
+ # SubChunkCount is the amount of sub chunks that are part of the chunk sent. Depending on if the cache
1401
+ # is enabled, a list of blob hashes will be sent, or, if disabled, the sub chunk data.
1402
+ # On newer versions, if this is a negative value it indicates to use the Subchunk Polling mechanism
1403
+ sub_chunk_count: varint
1404
+ # HighestSubChunk is the highest sub-chunk at the position that is not all air. It is only set if the
1405
+ # RequestMode is set to protocol.SubChunkRequestModeLimited.
1406
+ highest_subchunk_count: sub_chunk_count ?
1407
+ if -2: lu16
1408
+ # CacheEnabled specifies if the client blob cache should be enabled. This system is based on hashes of
1409
+ # blobs which are consistent and saved by the client in combination with that blob, so that the server
1410
+ # does not have to send the same chunk multiple times. If the client does not yet have a blob with the hash sent,
1411
+ # it will send a ClientCacheBlobStatus packet containing the hashes is does not have the data of.
1412
+ cache_enabled: bool
1413
+ blobs: cache_enabled?
1414
+ if true:
1415
+ # BlobHashes is a list of all blob hashes used in the chunk. It is composed of SubChunkCount + 1 hashes,
1416
+ # with the first SubChunkCount hashes being those of the sub chunks and the last one that of the biome
1417
+ # of the chunk.
1418
+ # If CacheEnabled is set to false, BlobHashes can be left empty.
1419
+ hashes: lu64[]varint
1420
+ # RawPayload is a serialised string of chunk data. The data held depends on if CacheEnabled is set to
1421
+ # true. If set to false, the payload is composed of multiple sub-chunks, each of which carry a version
1422
+ # which indicates the way they are serialised, followed by biomes, border blocks and tile entities. If
1423
+ # CacheEnabled is true, the payload consists out of the border blocks and tile entities only.
1424
+ payload: ByteArray
1425
+
1426
+ packet_set_commands_enabled:
1427
+ !id: 0x3b
1428
+ !bound: client
1429
+ enabled: bool
1430
+
1431
+ packet_set_difficulty:
1432
+ !id: 0x3c
1433
+ !bound: client
1434
+ difficulty: varint
1435
+
1436
+ packet_change_dimension:
1437
+ !id: 0x3d
1438
+ !bound: client
1439
+ dimension: zigzag32
1440
+ position: vec3f
1441
+ respawn: bool
1442
+
1443
+ # SetPlayerGameType is sent by the server to update the game type (game mode) of the player
1444
+ packet_set_player_game_type:
1445
+ !id: 0x3e
1446
+ !bound: both
1447
+ # The new gamemode for the player.
1448
+ # Some of these game types require additional flags to be set in an AdventureSettings packet for
1449
+ # the game mode to obtain its full functionality.
1450
+ gamemode: GameMode
1451
+
1452
+ packet_player_list:
1453
+ !id: 0x3f
1454
+ !bound: client
1455
+ records: PlayerRecords
1456
+
1457
+ packet_simple_event:
1458
+ !id: 0x40
1459
+ !bound: client
1460
+ event_type: lu16 =>
1461
+ 0: uninitialized_subtype
1462
+ 1: enable_commands
1463
+ 2: disable_commands
1464
+ 3: unlock_world_template_settings
1465
+
1466
+ # Event is sent by the server to send an event with additional data. It is typically sent to the client for
1467
+ # telemetry reasons, much like the SimpleEvent packet.
1468
+ packet_event:
1469
+ !id: 0x41
1470
+ !bound: client
1471
+ runtime_id: varint64
1472
+ event_type: zigzag32 =>
1473
+ 0: achievement_awarded
1474
+ 1: entity_interact
1475
+ 2: portal_built
1476
+ 3: portal_used
1477
+ 4: mob_killed
1478
+ 5: cauldron_used
1479
+ 6: player_death
1480
+ 7: boss_killed
1481
+ 8: agent_command
1482
+ 9: agent_created
1483
+ 10: banner_pattern_removed
1484
+ 11: commaned_executed
1485
+ 12: fish_bucketed
1486
+ 13: mob_born
1487
+ 14: pet_died
1488
+ 15: cauldron_block_used
1489
+ 16: composter_block_used
1490
+ 17: bell_block_used
1491
+ 18: actor_definition
1492
+ 19: raid_update
1493
+ 20: player_movement_anomaly
1494
+ 21: player_moement_corrected
1495
+ 22: honey_harvested
1496
+ 23: target_block_hit
1497
+ 24: piglin_barter
1498
+ 25: waxed_or_unwaxed_copper
1499
+ 26: code_builder_runtime_action
1500
+ 27: code_builder_scoreboard
1501
+ 28: strider_ridden_in_lava_in_overworld
1502
+ 29: sneak_close_to_sculk_sensor
1503
+ 30: careful_restoration
1504
+ use_player_id: u8
1505
+ event_data: restBuffer # Unknown data, TODO: add
1506
+
1507
+ packet_spawn_experience_orb:
1508
+ !id: 0x42
1509
+ !bound: client
1510
+ position: vec3f
1511
+ count: zigzag32
1512
+
1513
+ UpdateMapFlags: [ "bitflags", {
1514
+ "type": "varint",
1515
+ "flags": [
1516
+ "void",
1517
+ "texture",
1518
+ "decoration",
1519
+ "initialisation"
1520
+ ]
1521
+ }]
1522
+
1523
+ # ClientBoundMapItemData is sent by the server to the client to update the data of a map shown to the client.
1524
+ # It is sent with a combination of flags that specify what data is updated.
1525
+ # The ClientBoundMapItemData packet may be used to update specific parts of the map only. It is not required
1526
+ # to send the entire map each time when updating one part.
1527
+ packet_clientbound_map_item_data:
1528
+ !id: 0x43
1529
+ !bound: client
1530
+ # MapID is the unique identifier that represents the map that is updated over network. It remains
1531
+ # consistent across sessions.
1532
+ map_id: zigzag64
1533
+ # UpdateFlags is a combination of flags found above that indicate what parts of the map should be updated
1534
+ # client-side.
1535
+ update_flags: UpdateMapFlags
1536
+ # Dimension is the dimension of the map that should be updated, for example the overworld (0), the nether
1537
+ # (1) or the end (2).
1538
+ dimension: u8
1539
+ # LockedMap specifies if the map that was updated was a locked map, which may be done using a cartography
1540
+ # table.
1541
+ locked: bool
1542
+ # Origin is the center position of the map being updated.
1543
+ origin: vec3i
1544
+ # The following fields apply only for the MapUpdateFlagInitialisation.
1545
+ # MapsIncludedIn holds an array of map IDs that the map updated is included in. This has to do with the
1546
+ # scale of the map: Each map holds its own map ID and all map IDs of maps that include this map and have
1547
+ # a bigger scale. This means that a scale 0 map will have 5 map IDs in this slice, whereas a scale 4 map
1548
+ # will have only 1 (its own).
1549
+ # The actual use of this field remains unknown.
1550
+ included_in: update_flags.initialisation ?
1551
+ if true: zigzag64[]varint
1552
+ # Scale is the scale of the map as it is shown in-game. It is written when any of the MapUpdateFlags are
1553
+ # set to the UpdateFlags field.
1554
+ scale: update_flags.initialisation || update_flags.decoration || update_flags.texture ?
1555
+ if true: u8
1556
+ # The following fields apply only for the MapUpdateFlagDecoration.
1557
+ # TrackedObjects is a list of tracked objects on the map, which may either be entities or blocks. The
1558
+ # client makes sure these tracked objects are actually tracked. (position updated etc.)
1559
+ tracked: update_flags.decoration ?
1560
+ if true:
1561
+ objects: TrackedObject[]varint
1562
+ decorations: MapDecoration[]varint
1563
+ # Updates to the map contents itself (texture)
1564
+ texture: update_flags.texture ?
1565
+ if true:
1566
+ # Width is the width of the texture area that was updated. The width may be a subset of the total width
1567
+ # of the map.
1568
+ width: zigzag32
1569
+ # Height is the height of the texture area that was updated. The height may be a subset of the total
1570
+ # height of the map
1571
+ height: zigzag32
1572
+ # XOffset is the X offset in pixels at which the updated texture area starts. From this X, the updated
1573
+ # texture will extend exactly Width pixels to the right.
1574
+ x_offset: zigzag32
1575
+ # YOffset is the Y offset in pixels at which the updated texture area starts. From this Y, the updated
1576
+ # texture will extend exactly Height pixels up.
1577
+ y_offset: zigzag32
1578
+ # Pixels is a list of pixel colours for the new texture of the map. It is indexed as Pixels[y][x], with
1579
+ # the length of the outer slice having to be exactly Height long and the inner slices exactly Width long.
1580
+ # To access this array, use $width * y + x
1581
+ pixels: varint[]varint
1582
+
1583
+
1584
+ packet_map_info_request:
1585
+ !id: 0x44
1586
+ !bound: both
1587
+ map_id: zigzag64
1588
+ # ClientPixels is a map of pixels sent from the client to notify the server about the pixels that it isn't
1589
+ # aware of.
1590
+ client_pixels: []lu32
1591
+ rgba: li32
1592
+ index: lu16
1593
+
1594
+ # RequestChunkRadius is sent by the client to the server to update the server on the chunk view radius that
1595
+ # it has set in the settings. The server may respond with a ChunkRadiusUpdated packet with either the chunk
1596
+ # radius requested, or a different chunk radius if the server chooses so.
1597
+ packet_request_chunk_radius:
1598
+ !id: 0x45
1599
+ !bound: both
1600
+ # ChunkRadius is the requested chunk radius. This value is always the value set in the settings of the
1601
+ # player.
1602
+ chunk_radius: zigzag32
1603
+ max_radius: u8
1604
+
1605
+ # ChunkRadiusUpdated is sent by the server in response to a RequestChunkRadius packet. It defines the chunk
1606
+ # radius that the server allows the client to have. This may be lower than the chunk radius requested by the
1607
+ # client in the RequestChunkRadius packet.
1608
+ packet_chunk_radius_update:
1609
+ !id: 0x46
1610
+ !bound: client
1611
+ # ChunkRadius is the final chunk radius that the client will adapt when it receives the packet. It does
1612
+ # not have to be the same as the requested chunk radius.
1613
+ chunk_radius: zigzag32
1614
+
1615
+ packet_item_frame_drop_item:
1616
+ !id: 0x47
1617
+ !bound: both
1618
+ coordinates: BlockCoordinates
1619
+
1620
+ packet_game_rules_changed:
1621
+ !id: 0x48
1622
+ !bound: client
1623
+ rules: GameRules
1624
+
1625
+ # Camera is sent by the server to use an Education Edition camera on a player. It produces an image
1626
+ # client-side.
1627
+ packet_camera:
1628
+ !id: 0x49
1629
+ !bound: client
1630
+ # CameraEntityUniqueID is the unique ID of the camera entity from which the picture was taken.
1631
+ camera_entity_unique_id: zigzag64
1632
+ # TargetPlayerUniqueID is the unique ID of the target player. The unique ID is a value that remains
1633
+ # consistent across different sessions of the same world, but most servers simply fill the runtime ID of
1634
+ # the player out for this field.
1635
+ target_player_unique_id: zigzag64
1636
+
1637
+ packet_boss_event:
1638
+ !id: 0x4a
1639
+ !bound: both
1640
+ boss_entity_id: zigzag64
1641
+ type: varint =>
1642
+ # S2C: Shows the boss-bar to the player.
1643
+ 0: show_bar
1644
+ # C2S: Registers a player to a boss fight.
1645
+ 1: register_player
1646
+ # S2C: Removes the boss-bar from the client.
1647
+ 2: hide_bar
1648
+ # C2S: Unregisters a player from a boss fight.
1649
+ 3: unregister_player
1650
+ # S2C: Sets the bar percentage.
1651
+ 4: set_bar_progress
1652
+ # S2C: Sets title of the bar.
1653
+ 5: set_bar_title
1654
+ # S2C: darkens the sky
1655
+ 6: update_properties
1656
+ # S2C: Not implemented :( Intended to alter bar appearance, but these currently produce no effect on client-side whatsoever.
1657
+ 7: texture
1658
+ # C2S: Client asking the server to resend all boss data.
1659
+ 8: query
1660
+ _: type?
1661
+ if show_bar:
1662
+ # BossBarTitle is the title shown above the boss bar. It currently does not function, and instead uses
1663
+ # the name tag of the boss entity at all times. It is only set if the EventType is BossEventShow or
1664
+ # BossEventTitle.
1665
+ title: string
1666
+ # HealthPercentage is the percentage of health that is shown in the boss bar. It currently does not
1667
+ # function, and instead uses the health percentage of the boss entity at all times. It is only set if the
1668
+ # EventType is BossEventShow or BossEventHealthPercentage.
1669
+ progress: lf32
1670
+ # ScreenDarkening currently seems not to do anything.
1671
+ screen_darkening: li16
1672
+ # Colour is the colour of the boss bar that is shown when a player is subscribed. It currently does not
1673
+ # function. It is only set if the EventType is BossEventShow, BossEventAppearanceProperties or
1674
+ # BossEventTexture.
1675
+ # Format is ARGB
1676
+ color: varint
1677
+ # Overlay is the overlay of the boss bar that is shown on top of the boss bar when a player is
1678
+ # subscribed. It currently does not function. It is only set if the EventType is BossEventShow,
1679
+ # BossEventAppearanceProperties or BossEventTexture.
1680
+ overlay: varint
1681
+ if register_player or unregister_player or query:
1682
+ # PlayerUniqueID is the unique ID of the player that is registered to or unregistered from the boss
1683
+ # fight. It is set if EventType is either BossEventRegisterPlayer or BossEventUnregisterPlayer.
1684
+ player_id: zigzag64
1685
+ if set_bar_progress:
1686
+ progress: lf32
1687
+ if set_bar_title:
1688
+ title: string
1689
+ if update_properties:
1690
+ screen_darkening: li16
1691
+ color: varint
1692
+ overlay: varint
1693
+ if texture:
1694
+ color: varint
1695
+ overlay: varint
1696
+
1697
+ packet_show_credits:
1698
+ !id: 0x4b
1699
+ !bound: client
1700
+ runtime_entity_id: varint64
1701
+ status: zigzag32
1702
+
1703
+ # This packet sends a list of commands to the client. Commands can have
1704
+ # arguments, and some of those arguments can have 'enum' values, which are a list of possible
1705
+ # values for the argument. The serialization is rather complex and involves palettes like chunks.
1706
+ ## In bedrock-protocol, listen to on('client.commands') for a simpler representation
1707
+ packet_available_commands:
1708
+ !id: 0x4c
1709
+ !bound: client
1710
+ # The length of the enums for all the command parameters in this packet
1711
+ values_len: varint
1712
+ # Not read from stream: instead calculated from the `values_len` field
1713
+ #
1714
+ # If the values_len < 0xff => byte,
1715
+ # If the values_len < 0xffff => short,
1716
+ # If the values_len < 0xffffff => int
1717
+ _enum_type: '["enum_size_based_on_values_len"]'
1718
+ # Here all the enum values for all of the possible commands are stored to one array palette
1719
+ enum_values: string[]$values_len
1720
+ # chained_subcommand_values is a slice of all chained subcommand names. chained_subcommand_values generally should
1721
+ # contain each possible value only once. chained_subcommands are built by pointing to entries in this slice.
1722
+ chained_subcommand_values: string[]varint
1723
+ # Integer parameters may sometimes have a prefix, such as the XP command:
1724
+ # /xp <amount: int> [player: target] <- here, the xp command gives experience points
1725
+ # /xp <amount: int>L [player: target] <- here, the xp command gives experience levels
1726
+ # This is the palette of suffixes
1727
+ suffixes: string[]varint
1728
+ # The list of enum objects
1729
+ enums: []varint
1730
+ # The name of the enum
1731
+ name: string
1732
+ # The values in the enum
1733
+ values: []varint
1734
+ # The indexes to value in the palette
1735
+ _: ../_enum_type?
1736
+ if byte: u8
1737
+ if short: lu16
1738
+ if int: lu32
1739
+ # chained_subcommands is a slice of all subcommands that are followed by a chained command. An example usage of this
1740
+ # is /execute which allows you to run another command as another entity or at a different position etc.
1741
+ chained_subcommands: []varint
1742
+ # ChainedSubcommandValue represents the value for a chained subcommand argument.
1743
+ # name is the name of the chained subcommand and shows up in the list as a regular subcommand enum.
1744
+ name: string
1745
+ # values contains the index and parameter type of the chained subcommand.
1746
+ values: []varint
1747
+ # index is the index of the argument in the ChainedSubcommandValues slice from the AvailableCommands packet. This is
1748
+ # then used to set the type specified by the Value field below.
1749
+ index: lu16
1750
+ # value is a combination of the flags above and specified the type of argument. Unlike regular parameter types,
1751
+ # this should NOT contain any of the special flags (valid, enum, suffixed or soft enum) but only the basic types.
1752
+ value: lu16
1753
+ command_data: []varint
1754
+ name: string
1755
+ description: string
1756
+ flags: lu16
1757
+ permission_level: u8
1758
+ alias: li32
1759
+ # chained_subcommand_offsets is a slice of offsets that all point to a different chained_subcommand from the
1760
+ # chained_subcommands slice in the available_commands packet.
1761
+ chained_subcommand_offsets: lu16[]varint
1762
+ # The list of overload parameters for this command
1763
+ overloads: []varint
1764
+ # chaining determines if the parameters use chained subcommands or not.
1765
+ chaining: bool
1766
+ # Each of the parameters gets an array of posible overloads
1767
+ parameters: []varint
1768
+ # The name of the parameter shown to the user (the `amount` in `/xp <amount: int>`)
1769
+ parameter_name: string
1770
+ value_type: lu16 =>
1771
+ 1: int
1772
+ 3: float
1773
+ 4: value
1774
+ 5: wildcard_int
1775
+ 6: operator
1776
+ 7: command_operator
1777
+ 8: target
1778
+ 10: wildcard_target
1779
+ 17: file_path
1780
+ 23: integer_range
1781
+ 43: equipment_slots
1782
+ 44: string
1783
+ 52: block_position
1784
+ 53: position
1785
+ 55: message
1786
+ 58: raw_text
1787
+ 62: json
1788
+ 71: block_states
1789
+ 74: command
1790
+ # In MC, this + prior field are combined to one 32bit bitfield
1791
+ enum_type: lu16 =>
1792
+ 0x10: valid
1793
+ 0x30: enum
1794
+ 0x100: suffixed
1795
+ 0x410: soft_enum
1796
+ # Is this parameter required?
1797
+ optional: bool
1798
+ # Additinal options for this command (thanks macroshaft...)
1799
+ options: CommandFlags
1800
+ # There are two types of enums: static enums which cannot be changed after sending AvaliableCommands,
1801
+ # (unless you resend the whole packet) and 'soft' or 'dynamic' enums like below which is an array
1802
+ # that can be updated with the UpdateSoftEnum packet
1803
+ dynamic_enums: []varint
1804
+ name: string
1805
+ values: string[]varint
1806
+ enum_constraints: []varint
1807
+ value_index: li32
1808
+ enum_index: li32
1809
+ constraints: []varint
1810
+ constraint: u8 =>
1811
+ 0: cheats_enabled
1812
+ 1: operator_permissions
1813
+ 2: host_permissions
1814
+
1815
+ # ParamOptionCollapseEnum specifies if the enum (only if the Type is actually an enum type. If not,
1816
+ # setting this to true has no effect) should be collapsed. This means that the options of the enum are
1817
+ # never shown in the actual usage of the command, but only as auto-completion, like it automatically does
1818
+ # with enums that have a big amount of options. To illustrate, it can make
1819
+ # <false|true|yes|no> <$Name: bool>.
1820
+ CommandFlags: [ "bitfield", [
1821
+ { "name": "unused", "size": 1, "signed": false },
1822
+ { "name": "collapse_enum", "size": 1, "signed": false },
1823
+ { "name": "has_semantic_constraint", "size": 1, "signed": false },
1824
+ { "name": "as_chained_command", "size": 1, "signed": false },
1825
+ { "name": "unknown2", "size": 4, "signed": false }, # 4 unused upper bits
1826
+ ]]
1827
+
1828
+ # enum_size_based_on_values_len: native
1829
+
1830
+ # CommandRequest is sent by the client to request the execution of a server-side command. Although some
1831
+ # servers support sending commands using the Text packet, this packet is guaranteed to have the correct
1832
+ # result.
1833
+ packet_command_request:
1834
+ !id: 0x4d
1835
+ !bound: server
1836
+ # CommandLine is the raw entered command line. The client does no parsing of the command line by itself
1837
+ # (unlike it did in the early stages), but lets the server do that.
1838
+ command: string
1839
+ # Origin holds information about the command sender that will be returnd back in the command response
1840
+ origin: CommandOrigin
1841
+ # Internal specifies if the command request internal. Setting it to false seems to work and the usage of
1842
+ # this field is not known.
1843
+ internal: bool
1844
+ # Specifies the version of the command to run, relative to the current Minecraft version. Should be set
1845
+ # to 52 as of 1.19.62
1846
+ version: varint
1847
+
1848
+
1849
+ # CommandBlockUpdate is sent by the client to update a command block at a specific position. The command
1850
+ # block may be either a physical block or an entity.
1851
+ packet_command_block_update:
1852
+ !id: 0x4e
1853
+ !bound: server
1854
+ # Block specifies if the command block updated was an actual physical block. If false, the command block
1855
+ # is in a minecart and has an entity runtime ID instead.
1856
+ is_block: bool
1857
+ # Position is the position of the command block updated. It is only set if Block is set to true. Nothing
1858
+ # happens if no command block is set at this position.
1859
+ _: is_block ?
1860
+ if true:
1861
+ # Position is the position of the command block updated. It is only set if Block is set to true. Nothing
1862
+ # happens if no command block is set at this position.
1863
+ position: BlockCoordinates
1864
+ # Mode is the mode of the command block. It is either CommandBlockImpulse, CommandBlockChain or
1865
+ # CommandBlockRepeat. It is only set if Block is set to true.
1866
+ mode: varint =>
1867
+ 0: impulse
1868
+ 1: repeat
1869
+ 2: chain
1870
+ # NeedsRedstone specifies if the command block needs to be powered by redstone to be activated. If false,
1871
+ # the command block is always active. The field is only set if Block is set to true.
1872
+ needs_redstone: bool
1873
+ # Conditional specifies the behaviour of the command block if the command block before it (the opposite
1874
+ # side of the direction the arrow if facing) fails to execute. If set to false, it will activate at all
1875
+ # times, whereas if set to true, it will activate only if the previous command block executed
1876
+ # successfully. The field is only set if Block is set to true.
1877
+ conditional: bool
1878
+ if false:
1879
+ minecart_entity_runtime_id: varint64
1880
+ # Command is the command currently entered in the command block. This is the command that is executed
1881
+ # when the command block is activated.
1882
+ command: string
1883
+ # LastOutput is the output of the last command executed by the command block. It may be left empty to
1884
+ # show simply no output at all, in combination with setting ShouldTrackOutput to false.
1885
+ last_output: string
1886
+ # Name is the name of the command block updated. If not empty, it will show this name hovering above the
1887
+ # command block when hovering over the block with the cursor.
1888
+ name: string
1889
+ # ShouldTrackOutput specifies if the command block tracks output. If set to false, the output box won't
1890
+ # be shown within the command block.
1891
+ should_track_output: bool
1892
+ # TickDelay is the delay in ticks between executions of a command block, if it is a repeating command
1893
+ # block.
1894
+ tick_delay: li32
1895
+ # ExecuteOnFirstTick specifies if the command block should execute on the first tick, AKA as soon as the
1896
+ # command block is enabled.
1897
+ execute_on_first_tick: bool
1898
+
1899
+ packet_command_output:
1900
+ !id: 0x4f
1901
+ !bound: client
1902
+ # CommandOrigin is the data specifying the origin of the command. In other words, the source that the
1903
+ # command request was from, such as the player itself or a websocket server. The client forwards the
1904
+ # messages in this packet to the right origin, depending on what is sent here.
1905
+ origin: CommandOrigin
1906
+ # OutputType specifies the type of output that is sent.
1907
+ output_type: i8 =>
1908
+ 1: last
1909
+ 2: silent
1910
+ 3: all
1911
+ 4: data_set
1912
+ # SuccessCount is the amount of times that a command was executed successfully as a result of the command
1913
+ # that was requested. For servers, this is usually a rather meaningless fields, but for vanilla, this is
1914
+ # applicable for commands created with Functions.
1915
+ success_count: varint
1916
+ # OutputMessages is a list of all output messages that should be sent to the player. Whether they are
1917
+ # shown or not, depends on the type of the messages.
1918
+ output: []varint
1919
+ # Success indicates if the output message was one of a successful command execution. If set to true, the
1920
+ # output message is by default coloured white, whereas if set to false, the message is by default
1921
+ # coloured red.
1922
+ success: bool
1923
+ # Message is the message that is sent to the client in the chat window. It may either be simply a
1924
+ # message or a translated built-in string like 'commands.tp.success.coordinates', combined with specific
1925
+ # parameters below.
1926
+ message_id: string
1927
+ # Parameters is a list of parameters that serve to supply the message sent with additional information,
1928
+ # such as the position that a player was teleported to or the effect that was applied to an entity.
1929
+ # These parameters only apply for the Minecraft built-in command output.
1930
+ parameters: string[]varint
1931
+ data_set: output_type ?
1932
+ if data_set: string
1933
+ default: void
1934
+
1935
+
1936
+ # UpdateTrade is sent by the server to update the trades offered by a villager to a player. It is sent at the
1937
+ # moment that a player interacts with a villager.
1938
+ packet_update_trade:
1939
+ !id: 0x50
1940
+ !bound: client
1941
+ # WindowID is the ID that identifies the trading window that the client currently has opened.
1942
+ window_id: WindowID
1943
+ # WindowType is an identifier specifying the type of the window opened. In vanilla, it appears this is
1944
+ # always filled out with 15.
1945
+ window_type: WindowType
1946
+ # Size is the amount of trading options that the villager has.
1947
+ size: varint
1948
+ # TradeTier is the tier of the villager that the player is trading with. The tier starts at 0 with a
1949
+ # first two offers being available, after which two additional offers are unlocked each time the tier
1950
+ # becomes one higher.
1951
+ trade_tier: varint
1952
+ # VillagerUniqueID is the unique ID of the villager entity that the player is trading with. The
1953
+ # TradeTier sent above applies to this villager.
1954
+ villager_unique_id: varint64
1955
+ # EntityUniqueID is the unique ID of the entity (usually a player) for which the trades are updated. The
1956
+ # updated trades may apply only to this entity.
1957
+ entity_unique_id: varint64
1958
+ # DisplayName is the name displayed at the top of the trading UI. It is usually used to represent the
1959
+ # profession of the villager in the UI.
1960
+ display_name: string
1961
+ # NewTradeUI specifies if the villager should be using the new trade UI (The one added in 1.11.) rather
1962
+ # than the old one. This should usually be set to true.
1963
+ new_trading_ui: bool
1964
+ # Trading based on Minecraft economy - specifies if the prices of the villager's offers are modified by an increase in
1965
+ # demand for the item. (A mechanic added in 1.11.) Buying more of the same item will increase the price
1966
+ # of that particular item.
1967
+ # https://minecraft.wiki/w/Trading#Economics
1968
+ economic_trades: bool
1969
+ # NBT serialised compound of offers that the villager has.
1970
+ offers: nbt
1971
+
1972
+ # UpdateEquip is sent by the server to the client upon opening a horse inventory. It is used to set the
1973
+ # content of the inventory and specify additional properties, such as the items that are allowed to be put
1974
+ # in slots of the inventory.
1975
+ packet_update_equipment:
1976
+ !id: 0x51
1977
+ !bound: client
1978
+ # WindowID is the identifier associated with the window that the UpdateEquip packet concerns. It is the
1979
+ # ID sent for the horse inventory that was opened before this packet was sent.
1980
+ window_id: WindowID
1981
+ # WindowType is the type of the window that was opened. Generally, this is the type of a horse inventory,
1982
+ # as the packet is specifically made for that.
1983
+ window_type: WindowType
1984
+ # Size is the size of the horse inventory that should be opened. A bigger size does, in fact, change the
1985
+ # amount of slots displayed.
1986
+ size: u8
1987
+ # EntityUniqueID is the unique ID of the entity whose equipment was 'updated' to the player. It is
1988
+ # typically the horse entity that had its inventory opened.
1989
+ entity_id: zigzag64
1990
+ # `inventory` is a network NBT serialised compound holding the content of the inventory of
1991
+ # the entity (the equipment) and additional data such as the allowed items for a particular slot, used to
1992
+ # make sure only saddles can be put in the saddle slot etc.
1993
+ inventory: nbt
1994
+
1995
+
1996
+ # ResourcePackDataInfo is sent by the server to the client to inform the client about the data contained in
1997
+ # one of the resource packs that are about to be sent.
1998
+ packet_resource_pack_data_info:
1999
+ !id: 0x52
2000
+ !bound: client
2001
+ # UUID is the unique ID of the resource pack that the info concerns.
2002
+ pack_id: string
2003
+ # DataChunkSize is the maximum size in bytes of the chunks in which the total size of the resource pack
2004
+ # to be sent will be divided. A size of 1MB (1024*1024) means that a resource pack of 15.5MB will be
2005
+ # split into 16 data chunks.
2006
+ max_chunk_size: lu32
2007
+ # ChunkCount is the total amount of data chunks that the sent resource pack will exist out of. It is the
2008
+ # total size of the resource pack divided by the DataChunkSize field.
2009
+ # The client doesn't actually seem to use this field. Rather, it divides the size by the chunk size to
2010
+ # calculate it itself.
2011
+ chunk_count: lu32
2012
+ # Size is the total size in bytes that the resource pack occupies. This is the size of the compressed
2013
+ # archive (zip) of the resource pack.
2014
+ size: lu64
2015
+ # Hash is a SHA256 hash of the content of the resource pack.
2016
+ hash: ByteArray
2017
+ # Premium specifies if the resource pack was a premium resource pack, meaning it was bought from the
2018
+ # Minecraft store.
2019
+ is_premium: bool
2020
+ # PackType is the type of the resource pack. It is one of the resource pack types listed.
2021
+ pack_type: u8 =>
2022
+ 1: addon
2023
+ 2: cached
2024
+ 3: copy_protected
2025
+ 4: behavior
2026
+ 5: persona_piece
2027
+ 6: resources
2028
+ 7: skins
2029
+ 8: world_template
2030
+
2031
+ # ResourcePackChunkData is sent to the client so that the client can download the resource pack. Each packet
2032
+ # holds a chunk of the compressed resource pack, of which the size is defined in the ResourcePackDataInfo
2033
+ # packet sent before.
2034
+ packet_resource_pack_chunk_data:
2035
+ !id: 0x53
2036
+ !bound: client
2037
+ # UUID is the unique ID of the resource pack that the chunk of data is taken out of.
2038
+ pack_id: string
2039
+ # ChunkIndex is the current chunk index of the chunk. It is a number that starts at 0 and is incremented
2040
+ # for each resource pack data chunk sent to the client.
2041
+ chunk_index: lu32
2042
+ # DataOffset is the current progress in bytes or offset in the data that the resource pack data chunk is
2043
+ # taken from.
2044
+ progress: lu64
2045
+ # RawPayload is a byte slice containing a chunk of data from the resource pack. It must be of the same size or
2046
+ # less than the DataChunkSize set in the ResourcePackDataInfo packet.
2047
+ payload: ByteArray
2048
+
2049
+ # ResourcePackChunkRequest is sent by the client to request a chunk of data from a particular resource pack,
2050
+ # that it has obtained information about in a ResourcePackDataInfo packet.
2051
+ packet_resource_pack_chunk_request:
2052
+ !id: 0x54
2053
+ !bound: server
2054
+ # UUID is the unique ID of the resource pack that the chunk of data is requested from.
2055
+ pack_id: string
2056
+ # ChunkIndex is the requested chunk index of the chunk. It is a number that starts at 0 and is
2057
+ # incremented for each resource pack data chunk requested.
2058
+ chunk_index: lu32
2059
+
2060
+ packet_transfer:
2061
+ !id: 0x55
2062
+ !bound: client
2063
+ server_address: string
2064
+ port: lu16
2065
+
2066
+ packet_play_sound:
2067
+ !id: 0x56
2068
+ !bound: client
2069
+ name: string
2070
+ coordinates: BlockCoordinates
2071
+ volume: lf32
2072
+ pitch: lf32
2073
+
2074
+ packet_stop_sound:
2075
+ !id: 0x57
2076
+ !bound: client
2077
+ name: string
2078
+ stop_all: bool
2079
+
2080
+ # SetTitle is sent by the server to make a title, subtitle or action bar shown to a player. It has several
2081
+ # fields that allow setting the duration of the titles.
2082
+ packet_set_title:
2083
+ !id: 0x58
2084
+ !bound: client
2085
+ # ActionType is the type of the action that should be executed upon the title of a player. It is one of
2086
+ # the constants above and specifies the response of the client to the packet.
2087
+ type: zigzag32 =>
2088
+ 0: clear
2089
+ 1: reset
2090
+ 2: set_title
2091
+ 3: set_subtitle
2092
+ 4: action_bar_message
2093
+ 5: set_durations
2094
+ 6: set_title_json
2095
+ 7: set_subtitle_json
2096
+ 8: action_bar_message_json
2097
+ # Text is the text of the title, which has a different meaning depending on the ActionType that the
2098
+ # packet has. The text is the text of a title, subtitle or action bar, depending on the type set.
2099
+ text: string
2100
+ # FadeInDuration is the duration that the title takes to fade in on the screen of the player. It is
2101
+ # measured in 20ths of a second (AKA in ticks).
2102
+ fade_in_time: zigzag32
2103
+ # RemainDuration is the duration that the title remains on the screen of the player. It is measured in
2104
+ # 20ths of a second (AKA in ticks).
2105
+ stay_time: zigzag32
2106
+ # FadeOutDuration is the duration that the title takes to fade out of the screen of the player. It is
2107
+ # measured in 20ths of a second (AKA in ticks).
2108
+ fade_out_time: zigzag32
2109
+ # XUID is the XBOX Live user ID of the player, which will remain consistent as long as the player is
2110
+ # logged in with the XBOX Live account. It is empty if the user is not logged into its XBL account.
2111
+ xuid: string
2112
+ # PlatformOnlineID is either a uint64 or an empty string.
2113
+ platform_online_id: string
2114
+
2115
+ packet_add_behavior_tree:
2116
+ !id: 0x59
2117
+ !bound: client
2118
+ behaviortree: string
2119
+
2120
+ # StructureBlockUpdate is sent by the client when it updates a structure block using the in-game UI. The
2121
+ # data it contains depends on the type of structure block that it is. In Minecraft Bedrock Edition v1.11,
2122
+ # there is only the Export structure block type, but in v1.13 the ones present in Java Edition will,
2123
+ # according to the wiki, be added too.
2124
+ packet_structure_block_update:
2125
+ !id: 0x5a
2126
+ !bound: client
2127
+ # Position is the position of the structure block that is updated.
2128
+ position: BlockCoordinates
2129
+ # StructureName is the name of the structure that was set in the structure block's UI. This is the name
2130
+ # used to export the structure to a file.
2131
+ structure_name: string
2132
+ # DataField is the name of a function to run, usually used during natural generation. A description can
2133
+ # be found here: https://minecraft.wiki/w/Structure_Block#Data.
2134
+ data_field: string
2135
+ # IncludePlayers specifies if the 'Include Players' toggle has been enabled, meaning players are also
2136
+ # exported by the structure block.
2137
+ include_players: bool
2138
+ # ShowBoundingBox specifies if the structure block should have its bounds outlined. A thin line will
2139
+ # encapsulate the bounds of the structure if set to true.
2140
+ show_bounding_box: bool
2141
+ # StructureBlockType is the type of the structure block updated. A list of structure block types that
2142
+ # will be used can be found in the constants above.
2143
+ structure_block_type: zigzag32
2144
+ # Settings is a struct of settings that should be used for exporting the structure. These settings are
2145
+ # identical to the last sent in the StructureBlockUpdate packet by the client.
2146
+ settings: StructureBlockSettings
2147
+ # RedstoneSaveMode is the mode that should be used to save the structure when used with redstone. In
2148
+ # Java Edition, this is always stored in memory, but in Bedrock Edition it can be stored either to disk
2149
+ # or memory. See the constants above for the options.
2150
+ redstone_save_mode: zigzag32
2151
+ # ShouldTrigger specifies if the structure block should be triggered immediately after this packet
2152
+ # reaches the server.
2153
+ should_trigger: bool
2154
+ # Waterlogged specifies if the structure block is waterlogged at the time of the packet being sent.
2155
+ water_logged: bool
2156
+
2157
+ # ShowStoreOffer is sent by the server to show a Marketplace store offer to a player. It opens a window
2158
+ # client-side that displays the item.
2159
+ # The ShowStoreOffer packet only works on the partnered servers: Servers that are not partnered will not have
2160
+ # a store buttons show up in the in-game pause menu and will, as a result, not be able to open store offers
2161
+ # on the client side. Sending the packet does therefore not work when using a proxy that is not connected to
2162
+ # with the domain of one of the partnered servers.
2163
+ packet_show_store_offer:
2164
+ !id: 0x5b
2165
+ !bound: client
2166
+ # OfferID is a string that identifies the offer for which a window should be opened. While typically a
2167
+ # UUID, the ID could be anything.
2168
+ offer_id: string
2169
+ # ShowAll specifies if all other offers of the same 'author' as the one of the offer associated with the
2170
+ # OfferID should also be displayed, alongside the target offer.
2171
+ show_all: bool
2172
+
2173
+
2174
+ # PurchaseReceipt is sent by the client to the server to notify the server it purchased an item from the
2175
+ # Marketplace store that was offered by the server. The packet is only used for partnered servers.
2176
+ packet_purchase_receipt:
2177
+ !id: 0x5c
2178
+ !bound: server
2179
+ # Receipts is a list of receipts, or proofs of purchases, for the offers that have been purchased by the
2180
+ # player.
2181
+ receipts: string[]varint
2182
+
2183
+ packet_player_skin:
2184
+ !id: 0x5d
2185
+ !bound: both
2186
+ uuid: uuid
2187
+ skin: Skin
2188
+ skin_name: string
2189
+ old_skin_name: string
2190
+ is_verified: bool
2191
+
2192
+ # SubClientLogin is sent when a sub-client joins the server while another client is already connected to it.
2193
+ # The packet is sent as a result of split-screen game play, and allows up to four players to play using the
2194
+ # same network connection. After an initial Login packet from the 'main' client, each sub-client that
2195
+ # connects sends a SubClientLogin to request their own login.
2196
+ packet_sub_client_login:
2197
+ !id: 0x5e
2198
+ !bound: server
2199
+ # ConnectionRequest is a string containing information about the player and JWTs that may be used to
2200
+ # verify if the player is connected to XBOX Live. The connection request also contains the necessary
2201
+ # client public key to initiate encryption.
2202
+ # The ConnectionRequest in this packet is identical to the one found in the Login packet.
2203
+ tokens: '["encapsulated", { "lengthType": "varint", "type": "LoginTokens" }]'
2204
+
2205
+ # AutomationClientConnect is used to make the client connect to a websocket server. This websocket server has
2206
+ # the ability to execute commands on the behalf of the client and it can listen for certain events fired by
2207
+ # the client.
2208
+ packet_initiate_web_socket_connection:
2209
+ !id: 0x5f
2210
+ !bound: client
2211
+ # ServerURI is the URI to make the client connect to. It can be, for example, 'localhost:8000/ws' to
2212
+ # connect to a websocket server on the localhost at port 8000.
2213
+ server: string
2214
+
2215
+
2216
+ # SetLastHurtBy is sent by the server to let the client know what entity type it was last hurt by. At this
2217
+ # moment, the packet is useless and should not be used. There is no behaviour that depends on if this
2218
+ # packet is sent or not.
2219
+ packet_set_last_hurt_by:
2220
+ !id: 0x60
2221
+ !bound: client
2222
+ entity_type: varint
2223
+
2224
+ # BookEdit is sent by the client when it edits a book. It is sent each time a modification was made and the
2225
+ # player stops its typing 'session', rather than simply after closing the book.
2226
+ packet_book_edit:
2227
+ !id: 0x61
2228
+ !bound: server
2229
+ type: u8 =>
2230
+ 0: replace_page
2231
+ 1: add_page
2232
+ 2: delete_page
2233
+ 3: swap_pages
2234
+ 4: sign
2235
+ slot: u8
2236
+ _: type?
2237
+ if replace_page or add_page:
2238
+ page_number: u8
2239
+ text: string
2240
+ # Only available on Education Edition.
2241
+ photo_name: string
2242
+ if delete_page:
2243
+ page_number: u8
2244
+ if swap_pages:
2245
+ page1: u8
2246
+ page2: u8
2247
+ if sign:
2248
+ title: string
2249
+ author: string
2250
+ xuid: string
2251
+
2252
+
2253
+ # NPCRequest is sent by the client when it interacts with an NPC.
2254
+ # The packet is specifically made for Education Edition, where NPCs are available to use.
2255
+ packet_npc_request:
2256
+ !id: 0x62
2257
+ !bound: both
2258
+ # EntityRuntimeID is the runtime ID of the NPC entity that the player interacted with. It is the same
2259
+ # as sent by the server when spawning the entity.
2260
+ runtime_entity_id: varint64
2261
+ # RequestType is the type of the request, which depends on the permission that the player has. It will
2262
+ # be either a type that indicates that the NPC should show its dialog, or that it should open the
2263
+ # editing window.
2264
+ request_type: u8 =>
2265
+ 0: set_actions
2266
+ 1: execute_action
2267
+ 2: execute_closing_commands
2268
+ 3: set_name
2269
+ 4: set_skin
2270
+ 5: set_interaction_text
2271
+ 6: execute_opening_commands
2272
+ # CommandString is the command string set in the NPC. It may consist of multiple commands, depending on
2273
+ # what the player set in it.
2274
+ command: string
2275
+ # ActionType is the type of the action to execute.
2276
+ action_type: u8 =>
2277
+ 0: set_actions
2278
+ 1: execute_action
2279
+ 2: execute_closing_commands
2280
+ 3: set_name
2281
+ 4: set_skin
2282
+ 5: set_interact_text
2283
+ 6: execute_opening_commands
2284
+ # SceneName is the name of the scene.
2285
+ scene_name: string
2286
+
2287
+ # PhotoTransfer is sent by the server to transfer a photo (image) file to the client. It is typically used
2288
+ # to transfer photos so that the client can display it in a portfolio in Education Edition.
2289
+ # While previously usable in the default Bedrock Edition, the displaying of photos in books was disabled and
2290
+ # the packet now has little use anymore.
2291
+ packet_photo_transfer:
2292
+ !id: 0x63
2293
+ !bound: server
2294
+ # PhotoName is the name of the photo to transfer. It is the exact file name that the client will download
2295
+ # the photo as, including the extension of the file.
2296
+ image_name: string
2297
+ # PhotoData is the raw data of the photo image. The format of this data may vary: Formats such as JPEG or
2298
+ # PNG work, as long as PhotoName has the correct extension.
2299
+ image_data: string
2300
+ # BookID is the ID of the book that the photo is associated with. If the PhotoName in a book with this ID
2301
+ # is set to PhotoName, it will display the photo (provided Education Edition is used).
2302
+ # The photo image is downloaded to a sub-folder with this book ID.
2303
+ book_id: string
2304
+ # PhotoType is one of the three photo types above.
2305
+ photo_type: u8
2306
+ # SourceType is the source photo type. It is one of the three photo types above.
2307
+ source_type: u8
2308
+ # OwnerEntityUniqueID is the entity unique ID of the photo's owner.
2309
+ owner_entity_unique_id: li64
2310
+ # NewPhotoName is the new name of the photo.
2311
+ new_photo_name: string
2312
+
2313
+ # ModalFormRequest is sent by the server to make the client open a form. This form may be either a modal form
2314
+ # which has two options, a menu form for a selection of options and a custom form for properties.
2315
+ packet_modal_form_request:
2316
+ !id: 0x64
2317
+ !bound: client
2318
+ # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player
2319
+ # submits the form, so that the server can identify which form was submitted.
2320
+ form_id: varint
2321
+ # FormData is a JSON encoded object of form data. The content of the object differs, depending on the
2322
+ # type of the form sent, which is also set in the JSON.
2323
+ data: string
2324
+
2325
+ # ModalFormResponse is sent by the client in response to a ModalFormRequest, after the player has submitted
2326
+ # the form sent. It contains the options/properties selected by the player, or a JSON encoded 'null' if
2327
+ # the form was closed by clicking the X at the top right corner of the form.
2328
+ packet_modal_form_response:
2329
+ !id: 0x65
2330
+ !bound: server
2331
+ # FormID is the form ID of the form the client has responded to. It is the same as the ID sent in the
2332
+ # ModalFormRequest, and may be used to identify which form was submitted.
2333
+ form_id: varint
2334
+ # HasResponseData is true if the client provided response data.
2335
+ has_response_data: bool
2336
+ # ResponseData is a JSON encoded value representing the response of the player. For a modal form, the response is
2337
+ # either true or false, for a menu form, the response is an integer specifying the index of the button clicked, and
2338
+ # for a custom form, the response is an array containing a value for each element.
2339
+ data: has_response_data ?
2340
+ if true: string
2341
+ # HasCancelReason is true if the client provided a reason for the form being cancelled.
2342
+ has_cancel_reason: bool
2343
+ # CancelReason represents the reason why the form was cancelled.
2344
+ _: has_cancel_reason ?
2345
+ if true:
2346
+ cancel_reason: u8 =>
2347
+ 0: closed
2348
+ 1: busy
2349
+
2350
+ # ServerSettingsRequest is sent by the client to request the settings specific to the server. These settings
2351
+ # are shown in a separate tab client-side, and have the same structure as a custom form.
2352
+ # ServerSettingsRequest has no fields.
2353
+ packet_server_settings_request:
2354
+ !id: 0x66
2355
+ !bound: server
2356
+
2357
+ # ServerSettingsResponse is optionally sent by the server in response to a ServerSettingsRequest from the
2358
+ # client. It is structured the same as a ModalFormRequest packet, and if filled out correctly, will show
2359
+ # a specific tab for the server in the settings of the client. A ModalFormResponse packet is sent by the
2360
+ # client in response to a ServerSettingsResponse, when the client fills out the settings and closes the
2361
+ # settings again.
2362
+ packet_server_settings_response:
2363
+ !id: 0x67
2364
+ !bound: client
2365
+ # FormID is an ID used to identify the form. The ID is saved by the client and sent back when the player
2366
+ # submits the form, so that the server can identify which form was submitted.
2367
+ form_id: varint
2368
+ # FormData is a JSON encoded object of form data. The content of the object differs, depending on the
2369
+ # type of the form sent, which is also set in the JSON.
2370
+ data: string
2371
+
2372
+ # ShowProfile is sent by the server to show the XBOX Live profile of one player to another.
2373
+ packet_show_profile:
2374
+ !id: 0x68
2375
+ !bound: client
2376
+ # XUID is the XBOX Live User ID of the player whose profile should be shown to the player. If it is not
2377
+ # a valid XUID, the client ignores the packet.
2378
+ xuid: string
2379
+
2380
+ # SetDefaultGameType is sent by the client when it toggles the default game type in the settings UI, and is
2381
+ # sent by the server when it actually changes the default game type, resulting in the toggle being changed
2382
+ # in the settings UI.
2383
+ packet_set_default_game_type:
2384
+ !id: 0x69
2385
+ !bound: server
2386
+ # GameType is the new game type that is set. When sent by the client, this is the requested new default
2387
+ # game type.
2388
+ gamemode: GameMode
2389
+
2390
+ # RemoveObjective is sent by the server to remove a scoreboard objective. It is used to stop showing a
2391
+ # scoreboard to a player.
2392
+ packet_remove_objective:
2393
+ !id: 0x6a
2394
+ !bound: client
2395
+ # ObjectiveName is the name of the objective that the scoreboard currently active has. This name must
2396
+ # be identical to the one sent in the SetDisplayObjective packet.
2397
+ objective_name: string
2398
+
2399
+ # SetDisplayObjective is sent by the server to display an object as a scoreboard to the player. Once sent,
2400
+ # it should be followed up by a SetScore packet to set the lines of the packet.
2401
+ packet_set_display_objective:
2402
+ !id: 0x6b
2403
+ !bound: client
2404
+ # DisplaySlot is the slot in which the scoreboard should be displayed. Available options can be found in
2405
+ # the constants above.
2406
+ display_slot: string
2407
+ # ObjectiveName is the name of the objective that the scoreboard displays. Filling out a random unique
2408
+ # value for this field works: It is not displayed in the scoreboard.
2409
+ objective_name: string
2410
+ # DisplayName is the name, or title, that is displayed at the top of the scoreboard.
2411
+ display_name: string
2412
+ # CriteriaName is the name of the criteria that need to be fulfilled in order for the score to be
2413
+ # increased. This can be any kind of string and does not show up client-side.
2414
+ criteria_name: string
2415
+ # SortOrder is the order in which entries on the scoreboard should be sorted. It is one of the constants
2416
+ # that may be found above.
2417
+ sort_order: zigzag32
2418
+
2419
+ # SetScore is sent by the server to send the contents of a scoreboard to the player. It may be used to either
2420
+ # add, remove or edit entries on the scoreboard.
2421
+ packet_set_score:
2422
+ !id: 0x6c
2423
+ !bound: client
2424
+ # ActionType is the type of the action to execute upon the scoreboard with the entries that the packet
2425
+ # has. If ActionType is ScoreboardActionModify, all entries will be added to the scoreboard if not yet
2426
+ # present, or modified if already present. If set to ScoreboardActionRemove, all scoreboard entries set
2427
+ # will be removed from the scoreboard.
2428
+ action: u8 =>
2429
+ 0: change
2430
+ 1: remove
2431
+ entries: []varint
2432
+ scoreboard_id: zigzag64
2433
+ objective_name: string
2434
+ score: li32
2435
+ _: ../action ?
2436
+ if change:
2437
+ entry_type: i8 =>
2438
+ 1: player
2439
+ 2: entity
2440
+ 3: fake_player
2441
+ entity_unique_id: entry_type ?
2442
+ if player or entity: zigzag64
2443
+ custom_name: entry_type ?
2444
+ if fake_player: string
2445
+
2446
+ # LabTable is sent by the client to let the server know it started a chemical reaction in Education Edition,
2447
+ # and is sent by the server to other clients to show the effects.
2448
+ # The packet is only functional if Education features are enabled.
2449
+ packet_lab_table:
2450
+ !id: 0x6d
2451
+ !bound: both
2452
+ # ActionType is the type of the action that was executed. It is one of the constants above. Typically,
2453
+ # only LabTableActionCombine is sent by the client, whereas LabTableActionReact is sent by the server.
2454
+ action_type: u8 =>
2455
+ 0: combine
2456
+ 1: react
2457
+ 2: reset
2458
+ # Position is the position at which the lab table used was located.
2459
+ position: vec3i
2460
+ # ReactionType is the type of the reaction that took place as a result of the items put into the lab
2461
+ # table. The reaction type can be either that of an item or a particle, depending on whatever the result
2462
+ # was of the reaction.
2463
+ reaction_type: u8
2464
+
2465
+ # UpdateBlockSynced is sent by the server to synchronise the falling of a falling block entity with the
2466
+ # transitioning back and forth from and to a solid block. It is used to prevent the entity from flickering,
2467
+ # and is used in places such as the pushing of blocks with pistons.
2468
+ packet_update_block_synced:
2469
+ !id: 0x6e
2470
+ !bound: client
2471
+ # Position is the block position at which a block is updated.
2472
+ position: BlockCoordinates
2473
+ # NewBlockRuntimeID is the runtime ID of the block that is placed at Position after sending the packet
2474
+ # to the client.
2475
+ block_runtime_id: varint
2476
+ # Flags is a combination of flags that specify the way the block is updated client-side. It is a
2477
+ # combination of the flags above, but typically sending only the BlockUpdateNetwork flag is sufficient.
2478
+ flags: UpdateBlockFlags
2479
+ # Layer is the world layer on which the block is updated. For most blocks, this is the first layer, as
2480
+ # that layer is the default layer to place blocks on, but for blocks inside of each other, this differs.
2481
+ layer: varint
2482
+ # EntityUniqueID is the unique ID of the falling block entity that the block transitions to or that the
2483
+ # entity transitions from.
2484
+ # Note that for both possible values for TransitionType, the EntityUniqueID should point to the falling
2485
+ # block entity involved.
2486
+ entity_unique_id: zigzag64
2487
+ # TransitionType is the type of the transition that happened. It is either BlockToEntityTransition, when
2488
+ # a block placed becomes a falling entity, or EntityToBlockTransition, when a falling entity hits the
2489
+ # ground and becomes a solid block again.
2490
+ transition_type: varint => TransitionType
2491
+
2492
+
2493
+ # MoveActorDelta is sent by the server to move an entity. The packet is specifically optimised to save as
2494
+ # much space as possible, by only writing non-zero fields.
2495
+ # As of 1.16.100, this packet no longer actually contains any deltas.
2496
+ packet_move_entity_delta:
2497
+ !id: 0x6f
2498
+ !bound: client
2499
+ # EntityRuntimeID is the runtime ID of the entity that is being moved. The packet works provided a
2500
+ # non-player entity with this runtime ID is present.
2501
+ runtime_entity_id: varint64
2502
+ # Flags is a list of flags that specify what data is in the packet.
2503
+ flags: DeltaMoveFlags
2504
+ x: flags.has_x?
2505
+ if true: lf32
2506
+ y: flags.has_y?
2507
+ if true: lf32
2508
+ z: flags.has_z?
2509
+ if true: lf32
2510
+ rot_x: flags.has_rot_x?
2511
+ if true: u8 # TODO: * implement ByteFloat
2512
+ rot_y: flags.has_rot_y?
2513
+ if true: u8
2514
+ rot_z: flags.has_rot_z?
2515
+ if true: u8
2516
+
2517
+ DeltaMoveFlags: [ "bitflags",
2518
+ {
2519
+ "type": "lu16",
2520
+ "flags": {
2521
+ "has_x": 0x01,
2522
+ "has_y": 0x02,
2523
+ "has_z": 0x04,
2524
+ "has_rot_x": 0x08,
2525
+ "has_rot_y": 0x10,
2526
+ "has_rot_z": 0x20,
2527
+ "on_ground": 0x40,
2528
+ "teleport": 0x80,
2529
+ "force_move": 0x100
2530
+ }
2531
+ }
2532
+ ]
2533
+
2534
+ # SetScoreboardIdentity is sent by the server to change the identity type of one of the entries on a
2535
+ # scoreboard. This is used to change, for example, an entry pointing to a player, to a fake player when it
2536
+ # leaves the server, and to change it back to a real player when it joins again.
2537
+ # In non-vanilla situations, the packet is quite useless.
2538
+ packet_set_scoreboard_identity:
2539
+ !id: 0x70
2540
+ !bound: client
2541
+ # ActionType is the type of the action to execute. The action is either ScoreboardIdentityActionRegister
2542
+ # to associate an identity with the entry, or ScoreboardIdentityActionClear to remove associations with
2543
+ # an entity.
2544
+ action: i8 =>
2545
+ 0: register_identity
2546
+ 1: clear_identity
2547
+ # Entries is a list of all entries in the packet. Each of these entries points to one of the entries on
2548
+ # a scoreboard. Depending on ActionType, their identity will either be registered or cleared.
2549
+ entries: []varint
2550
+ scoreboard_id: zigzag64
2551
+ entity_unique_id: ../action ?
2552
+ if register_identity: zigzag64
2553
+ default: void
2554
+
2555
+
2556
+ # SetLocalPlayerAsInitialised is sent by the client in response to a PlayStatus packet with the status set
2557
+ # to spawn. The packet marks the moment at which the client is fully initialised and can receive any packet
2558
+ # without discarding it.
2559
+ packet_set_local_player_as_initialized:
2560
+ !id: 0x71
2561
+ !bound: server
2562
+ # EntityRuntimeID is the entity runtime ID the player was assigned earlier in the login sequence in the
2563
+ # StartGame packet.
2564
+ runtime_entity_id: varint64
2565
+
2566
+ # UpdateSoftEnum is sent by the server to update a soft enum, also known as a dynamic enum, previously sent
2567
+ # in the AvailableCommands packet. It is sent whenever the enum should get new options or when some of its
2568
+ # options should be removed.
2569
+ # The UpdateSoftEnum packet will apply for enums that have been set in the AvailableCommands packet with the
2570
+ # 'Dynamic' field of the CommandEnum set to true.
2571
+ packet_update_soft_enum:
2572
+ !id: 0x72
2573
+ !bound: client
2574
+ # EnumType is the type of the enum. This type must be identical to the one set in the AvailableCommands
2575
+ # packet, because the client uses this to recognise which enum to update.
2576
+ enum_type: string
2577
+ # Options is a list of options that should be updated. Depending on the ActionType field, either these
2578
+ # options will be added to the enum, the enum options will be set to these options or all of these
2579
+ # options will be removed from the enum.
2580
+ options: string[]varint
2581
+ # ActionType is the type of the action to execute on the enum. The Options field has a different result,
2582
+ # depending on what ActionType is used.
2583
+ action_type: u8 =>
2584
+ 0: add
2585
+ 1: remove
2586
+ 2: update
2587
+
2588
+ # NetworkStackLatency is sent by the server (and the client, on development builds) to measure the latency
2589
+ # over the entire Minecraft stack, rather than the RakNet latency. It has other usages too, such as the
2590
+ # ability to be used as some kind of acknowledgement packet, to know when the client has received a certain
2591
+ # other packet.
2592
+ packet_network_stack_latency:
2593
+ !id: 0x73
2594
+ !bound: both
2595
+ # Timestamp is the timestamp of the network stack latency packet. The client will, if NeedsResponse is
2596
+ # set to true, send a NetworkStackLatency packet with this same timestamp packet in response.
2597
+ timestamp: lu64
2598
+ # NeedsResponse specifies if the sending side of this packet wants a response to the packet, meaning that
2599
+ # the other side should send a NetworkStackLatency packet back.
2600
+ needs_response: u8
2601
+
2602
+ # ScriptCustomEvent is sent by both the client and the server. It is a way to let scripts communicate with
2603
+ # the server, so that the client can let the server know it triggered an event, or the other way around.
2604
+ # It is essentially an RPC kind of system.
2605
+ # Deprecated: ScriptCustomEvent is deprecated as of 1.20.10.
2606
+ packet_script_custom_event:
2607
+ !id: 0x75
2608
+ !bound: both
2609
+ # EventName is the name of the event. The script and the server will use this event name to identify the
2610
+ # data that is sent.
2611
+ event_name: string
2612
+ # EventData is the data of the event. This data is typically a JSON encoded string, that the script is
2613
+ # able to encode and decode too.
2614
+ event_data: string
2615
+
2616
+ # SpawnParticleEffect is sent by the server to spawn a particle effect client-side. Unlike other packets that
2617
+ # result in the appearing of particles, this packet can show particles that are not hardcoded in the client.
2618
+ # They can be added and changed through behaviour packs to implement custom particles.
2619
+ packet_spawn_particle_effect:
2620
+ !id: 0x76
2621
+ !bound: client
2622
+ # Dimension is the dimension that the particle is spawned in. Its exact usage is not clear, as the
2623
+ # dimension has no direct effect on the particle.
2624
+ dimension: u8
2625
+ # EntityUniqueID is the unique ID of the entity that the spawned particle may be attached to. If this ID
2626
+ # is not -1, the Position below will be interpreted as relative to the position of the entity associated
2627
+ # with this unique ID.
2628
+ entity_id: zigzag64
2629
+ # Position is the position that the particle should be spawned at. If the position is too far away from
2630
+ # the player, it will not show up.
2631
+ # If EntityUniqueID is not -1, the position will be relative to the position of the entity.
2632
+ position: vec3f
2633
+ # ParticleName is the name of the particle that should be shown. This name may point to a particle effect
2634
+ # that is built-in, or to one implemented by behaviour packs.
2635
+ particle_name: string
2636
+ # MoLangVariables is an encoded JSON map of MoLang variables that may be applicable to the particle spawn. This can
2637
+ # just be left empty in most cases.
2638
+ # TODO: Investigate, probably not a ByteArray...
2639
+ molang_variables: ByteArray
2640
+
2641
+ # AvailableActorIdentifiers is sent by the server at the start of the game to let the client know all
2642
+ # entities that are available on the server.
2643
+ packet_available_entity_identifiers:
2644
+ !id: 0x77
2645
+ !bound: client
2646
+ # SerialisedEntityIdentifiers is a network NBT serialised compound of all entity identifiers that are
2647
+ # available in the server.
2648
+ nbt: nbt
2649
+
2650
+ # Not used. Use `packet_level_sound_event`.
2651
+ packet_level_sound_event_v2:
2652
+ !id: 0x78
2653
+ !bound: both
2654
+ sound_id: u8
2655
+ position: vec3f
2656
+ block_id: zigzag32
2657
+ entity_type: string
2658
+ is_baby_mob: bool
2659
+ is_global: bool
2660
+
2661
+ # NetworkChunkPublisherUpdate is sent by the server to change the point around which chunks are and remain
2662
+ # loaded. This is useful for mini-game servers, where only one area is ever loaded, in which case the
2663
+ # NetworkChunkPublisherUpdate packet can be sent in the middle of it, so that no chunks ever need to be
2664
+ # additionally sent during the course of the game.
2665
+ # In reality, the packet is not extraordinarily useful, and most servers just send it constantly at the
2666
+ # position of the player.
2667
+ # If the packet is not sent at all, no chunks will be shown to the player, regardless of where they are sent.
2668
+ packet_network_chunk_publisher_update:
2669
+ !id: 0x79
2670
+ !bound: client
2671
+ # Position is the block position around which chunks loaded will remain shown to the client. Most servers
2672
+ # set this position to the position of the player itself.
2673
+ ##TODO: Check putSignedBlockPosition
2674
+ coordinates: BlockCoordinates
2675
+ # Radius is the radius in blocks around Position that chunks sent show up in and will remain loaded in.
2676
+ # Unlike the RequestChunkRadius and ChunkRadiusUpdated packets, this radius is in blocks rather than
2677
+ # chunks, so the chunk radius needs to be multiplied by 16. (Or shifted to the left by 4.)
2678
+ radius: varint
2679
+ saved_chunks: []lu32
2680
+ # ChunkX is the X coordinate of the chunk sent. (To translate a block's X to a chunk's X: x >> 4)
2681
+ x: zigzag32
2682
+ # ChunkZ is the Z coordinate of the chunk sent. (To translate a block's Z to a chunk's Z: z >> 4)
2683
+ z: zigzag32
2684
+
2685
+
2686
+ # BiomeDefinitionList is sent by the server to let the client know all biomes that are available and
2687
+ # implemented on the server side. It is much like the AvailableActorIdentifiers packet, but instead
2688
+ # functions for biomes.
2689
+ packet_biome_definition_list:
2690
+ !id: 0x7a
2691
+ !bound: client
2692
+ # SerialisedBiomeDefinitions is a network NBT serialised compound of all definitions of biomes that are
2693
+ # available on the server.
2694
+ nbt: nbt
2695
+
2696
+ # LevelSoundEvent is sent by the server to make any kind of built-in sound heard to a player. It is sent to,
2697
+ # for example, play a stepping sound or a shear sound. The packet is also sent by the client, in which case
2698
+ # it could be forwarded by the server to the other players online. If possible, the packets from the client
2699
+ # should be ignored however, and the server should play them on its own accord.
2700
+ packet_level_sound_event:
2701
+ !id: 0x7b
2702
+ !bound: both
2703
+ # SoundType is the type of the sound to play. Some of the sound types
2704
+ # require additional data, which is set in the EventData field.
2705
+ sound_id: SoundType
2706
+ # Position is the position of the sound event. The player will be able to hear the direction of the sound
2707
+ # based on what position is sent here.
2708
+ position: vec3f
2709
+ # ExtraData is a packed integer that some sound types use to provide extra data. An example of this is
2710
+ # the note sound, which is composed of a pitch and an instrument type.
2711
+ extra_data: zigzag32
2712
+ # EntityType is the string entity type of the entity that emitted the sound, for example
2713
+ # 'minecraft:skeleton'. Some sound types use this entity type for additional data.
2714
+ entity_type: string
2715
+ # BabyMob specifies if the sound should be that of a baby mob. It is most notably used for parrot
2716
+ # imitations, which will change based on if this field is set to true or not.
2717
+ is_baby_mob: bool
2718
+ # DisableRelativeVolume specifies if the sound should be played relatively or not. If set to true, the
2719
+ # sound will have full volume, regardless of where the Position is, whereas if set to false, the sound's
2720
+ # volume will be based on the distance to Position.
2721
+ is_global: bool
2722
+
2723
+ # LevelEventGeneric is sent by the server to send a 'generic' level event to the client. This packet sends an
2724
+ # NBT serialised object and may for that reason be used for any event holding additional data.
2725
+ packet_level_event_generic:
2726
+ !id: 0x7c
2727
+ !bound: client
2728
+ # EventID is a unique identifier that identifies the event called. The data that follows has fields in
2729
+ # the NBT depending on what event it is.
2730
+ event_id: varint
2731
+ # SerialisedEventData is a network little endian serialised object of event data, with fields that vary
2732
+ # depending on EventID.
2733
+ # Unlike many other NBT structures, this data is not actually in a compound but just loosely floating
2734
+ # NBT tags. To decode using the nbt package, you would need to append 0x0a00 at the start (compound id
2735
+ # and name length) and add 0x00 at the end, to manually wrap it in a compound. Likewise, you would have
2736
+ # to remove these bytes when encoding.
2737
+ nbt: nbtLoop
2738
+
2739
+ # LecternUpdate is sent by the client to update the server on which page was opened in a book on a lectern,
2740
+ # or if the book should be removed from it.
2741
+ packet_lectern_update:
2742
+ !id: 0x7d
2743
+ !bound: server
2744
+ # Page is the page number in the book that was opened by the player on the lectern.
2745
+ page: u8
2746
+ # PageCount is the number of pages that the book opened in the lectern has.
2747
+ page_count: u8
2748
+ # Position is the position of the lectern that was updated. If no lectern is at the block position,
2749
+ # the packet should be ignored.
2750
+ position: vec3i
2751
+ # DropBook specifies if the book currently set on display in the lectern should be dropped server-side.
2752
+ drop_book: bool
2753
+
2754
+ # This packet was removed.
2755
+ packet_video_stream_connect:
2756
+ !id: 0x7e
2757
+ !bound: client
2758
+ server_uri: string
2759
+ frame_send_frequency: lf32
2760
+ action: u8 =>
2761
+ 1: none
2762
+ 2: close
2763
+ resolution_x: li32
2764
+ resolution_y: li32
2765
+
2766
+ # This is NOT a Minecraft entity, but an entity in the Entity Component System (ECS)
2767
+ # for the game engine Minecrat Bedrock uses. Internally, all 'Minecraft entities' are
2768
+ # known as Actors including in packet names and fields. However, these are irrelevant
2769
+ # internal details so we don't do the renames in these protocol definitions, for simplicity we just use Entity.
2770
+ #
2771
+ # AddEntity is sent by the server to the client. Its function is not entirely clear: It does not add an
2772
+ # entity in the sense of an in-game entity, but has to do with the ECS that Minecraft uses.
2773
+ packet_add_ecs_entity:
2774
+ !id: 0x7f
2775
+ !bound: client
2776
+ # EntityNetworkID is the network ID of the entity that should be added.
2777
+ network_id: varint64
2778
+
2779
+ # RemoveEntity is sent by the server to the client. Its function is not entirely clear: It does not remove an
2780
+ # entity in the sense of an in-game entity, but has to do with the ECS that Minecraft uses
2781
+ packet_remove_ecs_entity:
2782
+ !id: 0x80
2783
+ !bound: client
2784
+ # EntityNetworkID is the network ID of the entity that should be removed.
2785
+ network_id: varint64
2786
+
2787
+ # ClientCacheStatus is sent by the client to the server at the start of the game. It is sent to let the
2788
+ # server know if it supports the client-side blob cache. Clients such as Nintendo Switch do not support the
2789
+ # cache, and attempting to use it anyway will fail.
2790
+ packet_client_cache_status:
2791
+ !id: 0x81
2792
+ !bound: both
2793
+ # Enabled specifies if the blob cache is enabled. If false, the server should not attempt to use the
2794
+ # blob cache. If true, it may do so, but it may also choose not to use it.
2795
+ enabled: bool
2796
+
2797
+ # OnScreenTextureAnimation is sent by the server to show a certain animation on the screen of the player.
2798
+ # The packet is used, as an example, for when a raid is triggered and when a raid is defeated.
2799
+ packet_on_screen_texture_animation:
2800
+ !id: 0x82
2801
+ !bound: client
2802
+ # AnimationType is the type of the animation to show. The packet provides no further extra data to allow
2803
+ # modifying the duration or other properties of the animation.
2804
+ animation_type: lu32
2805
+
2806
+
2807
+ # MapCreateLockedCopy is sent by the server to create a locked copy of one map into another map. In vanilla,
2808
+ # it is used in the cartography table to create a map that is locked and cannot be modified.
2809
+ packet_map_create_locked_copy:
2810
+ !id: 0x83
2811
+ !bound: client
2812
+ # OriginalMapID is the ID of the map that is being copied. The locked copy will obtain all content that
2813
+ # is visible on this map, except the content will not change.
2814
+ original_map_id: zigzag64
2815
+ # NewMapID is the ID of the map that holds the locked copy of the map that OriginalMapID points to. Its
2816
+ # contents will be impossible to change.
2817
+ new_map_id: zigzag64
2818
+
2819
+
2820
+ # StructureTemplateDataRequest is sent by the client to request data of a structure.
2821
+ packet_structure_template_data_export_request:
2822
+ !id: 0x84
2823
+ !bound: server
2824
+ # StructureName is the name of the structure that was set in the structure block's UI. This is the name
2825
+ # used to export the structure to a file.
2826
+ name: string
2827
+ # Position is the position of the structure block that has its template data requested.
2828
+ position: BlockCoordinates
2829
+ # Settings is a struct of settings that should be used for exporting the structure. These settings are
2830
+ # identical to the last sent in the StructureBlockUpdate packet by the client.
2831
+ settings: StructureBlockSettings
2832
+ # RequestType specifies the type of template data request that the player sent.
2833
+ request_type: u8 =>
2834
+ 1: export_from_save
2835
+ 2: export_from_load
2836
+ 3: query_saved_structure
2837
+ 4: import_from_save
2838
+
2839
+ # StructureTemplateDataResponse is sent by the server to send data of a structure to the client in response
2840
+ # to a StructureTemplateDataRequest packet.
2841
+ packet_structure_template_data_export_response:
2842
+ !id: 0x85
2843
+ !bound: client
2844
+ name: string
2845
+ success: bool
2846
+ nbt: success ?
2847
+ if true: nbt
2848
+ # ResponseType specifies the response type of the packet. This depends on the RequestType field sent in
2849
+ # the StructureTemplateDataRequest packet and is one of the constants above.
2850
+ response_type: u8 =>
2851
+ 1: export
2852
+ 2: query
2853
+ 3: import
2854
+
2855
+ # No longer used.
2856
+ packet_update_block_properties:
2857
+ !id: 0x86
2858
+ !bound: client
2859
+ nbt: nbt
2860
+
2861
+ # ClientCacheBlobStatus is part of the blob cache protocol. It is sent by the client to let the server know
2862
+ # what blobs it needs and which blobs it already has, in an ACK type system.
2863
+ packet_client_cache_blob_status:
2864
+ !id: 0x87
2865
+ !bound: server
2866
+ # The number of MISSes in this packet
2867
+ misses: varint
2868
+ # The number of HITs in this packet
2869
+ haves: varint
2870
+ # A list of blob hashes that the client does not have a blob available for. The server
2871
+ # should send the blobs matching these hashes as soon as possible.
2872
+ missing: lu64[]$misses
2873
+ # A list of hashes that the client does have a cached blob for. Server doesn't need to send.
2874
+ have: lu64[]$haves
2875
+
2876
+ # ClientCacheMissResponse is part of the blob cache protocol. It is sent by the server in response to a
2877
+ # ClientCacheBlobStatus packet and contains the blob data of all blobs that the client acknowledged not to
2878
+ # have yet.
2879
+ packet_client_cache_miss_response:
2880
+ !id: 0x88
2881
+ !bound: client
2882
+ blobs: Blob[]varint
2883
+
2884
+ # EducationSettings is a packet sent by the server to update Minecraft: Education Edition related settings.
2885
+ # It is unused by the normal base game.
2886
+ packet_education_settings:
2887
+ !id: 0x89
2888
+ !bound: client
2889
+ # CodeBuilderDefaultURI is the default URI that the code builder is ran on. Using this, a Code Builder
2890
+ # program can make code directly affect the server.
2891
+ CodeBuilderDefaultURI: string
2892
+ # CodeBuilderTitle is the title of the code builder shown when connected to the CodeBuilderDefaultURI.
2893
+ CodeBuilderTitle: string
2894
+ # CanResizeCodeBuilder specifies if clients connected to the world should be able to resize the code
2895
+ # builder when it is opened.
2896
+ CanResizeCodeBuilder: bool
2897
+ disable_legacy_title_bar: bool
2898
+ post_process_filter: string
2899
+ screenshot_border_path: string
2900
+ has_agent_capabilities: bool
2901
+ agent_capabilities: has_agent_capabilities ?
2902
+ if true:
2903
+ has: bool
2904
+ can_modify_blocks: bool
2905
+ HasOverrideURI: bool
2906
+ OverrideURI: HasOverrideURI?
2907
+ if true: string
2908
+ # HasQuiz specifies if the world has a quiz connected to it.
2909
+ HasQuiz: bool
2910
+ has_external_link_settings: bool
2911
+ external_link_settings: has_external_link_settings ?
2912
+ if true:
2913
+ has: bool
2914
+ url: string
2915
+ display_name: string
2916
+
2917
+ # Emote is sent by both the server and the client. When the client sends an emote, it sends this packet to
2918
+ # the server, after which the server will broadcast the packet to other players online.
2919
+ packet_emote:
2920
+ !id: 0x8a
2921
+ !bound: both
2922
+ # EntityRuntimeID is the entity that sent the emote. When a player sends this packet, it has this field
2923
+ # set as its own entity runtime ID.
2924
+ entity_id: varint64
2925
+ # EmoteID is the ID of the emote to send.
2926
+ emote_id: string
2927
+ # XUID is the Xbox User ID of the player that sent the emote. It is only set when the emote is used by a player that
2928
+ # is authenticated with Xbox Live.
2929
+ xuid: string
2930
+ # PlatformID is an identifier only set for particular platforms when using an emote (presumably only for Nintendo
2931
+ # Switch). It is otherwise an empty string, and is used to decide which players are able to emote with each other.
2932
+ platform_id: string
2933
+ # Flags is a combination of flags that change the way the Emote packet operates. When the server sends
2934
+ # this packet to other players, EmoteFlagServerSide must be present.
2935
+ flags: u8 =>
2936
+ 1: server_side
2937
+ 2: mute_chat
2938
+
2939
+ # MultiPlayerSettings is sent by the client to update multi-player related settings server-side and sent back
2940
+ # to online players by the server.
2941
+ # The MultiPlayerSettings packet is a Minecraft: Education Edition packet. It has no functionality for the
2942
+ # base game.
2943
+ packet_multiplayer_settings:
2944
+ !id: 0x8b
2945
+ !bound: server
2946
+ # ActionType is the action that should be done when this packet is sent. It is one of the constants that
2947
+ # may be found above.
2948
+ action_type: zigzag32 =>
2949
+ 0: enable_multiplayer
2950
+ 1: disable_multiplayer
2951
+ 2: refresh_join_code
2952
+
2953
+ # SettingsCommand is sent by the client when it changes a setting in the settings that results in the issuing
2954
+ # of a command to the server, such as when Show Coordinates is enabled.
2955
+ packet_settings_command:
2956
+ !id: 0x8c
2957
+ !bound: server
2958
+ # CommandLine is the full command line that was sent to the server as a result of the setting that the
2959
+ # client changed.
2960
+ command_line: string
2961
+ # SuppressOutput specifies if the client requests the suppressing of the output of the command that was
2962
+ # executed. Generally this is set to true, as the client won't need a message to confirm the output of
2963
+ # the change.
2964
+ suppress_output: bool
2965
+
2966
+ # AnvilDamage is sent by the client to request the dealing damage to an anvil. This packet is completely
2967
+ # pointless and the server should never listen to it.
2968
+ packet_anvil_damage:
2969
+ !id: 0x8d
2970
+ !bound: server
2971
+ # Damage is the damage that the client requests to be dealt to the anvil.
2972
+ damage: u8
2973
+ # AnvilPosition is the position in the world that the anvil can be found at.
2974
+ position: BlockCoordinates
2975
+
2976
+ # CompletedUsingItem is sent by the server to tell the client that it should be done using the item it is
2977
+ # currently using.
2978
+ packet_completed_using_item:
2979
+ !id: 0x8e
2980
+ !bound: client
2981
+ # UsedItemID is the item ID of the item that the client completed using. This should typically be the
2982
+ # ID of the item held in the hand.
2983
+ used_item_id: li16
2984
+ # UseMethod is the method of the using of the item that was completed. It is one of the constants that
2985
+ # may be found above.
2986
+ use_method: li32 =>
2987
+ 0: equip_armor
2988
+ 1: eat
2989
+ 2: attack
2990
+ 3: consume
2991
+ 4: throw
2992
+ 5: shoot
2993
+ 6: place
2994
+ 7: fill_bottle
2995
+ 8: fill_bucket
2996
+ 9: pour_bucket
2997
+ 10: use_tool
2998
+ 11: interact
2999
+ 12: retrieved
3000
+ 13: dyed
3001
+ 14: traded
3002
+ 15: brushing_completed
3003
+
3004
+ # NetworkSettings is sent by the server to update a variety of network settings. These settings modify the
3005
+ # way packets are sent over the network stack.
3006
+ packet_network_settings:
3007
+ !id: 0x8f
3008
+ !bound: client
3009
+ # CompressionThreshold is the minimum size of a packet that is compressed when sent. If the size of a
3010
+ # packet is under this value, it is not compressed.
3011
+ # When set to 0, all packets will be left uncompressed.
3012
+ compression_threshold: lu16
3013
+ # CompressionAlgorithm is the algorithm that is used to compress packets.
3014
+ compression_algorithm: lu16 =>
3015
+ 0: deflate
3016
+ 1: snappy
3017
+ # ClientThrottle regulates whether the client should throttle players when exceeding of the threshold. Players
3018
+ # outside threshold will not be ticked, improving performance on low-end devices.
3019
+ client_throttle: bool
3020
+ # ClientThrottleThreshold is the threshold for client throttling. If the number of players exceeds this value, the
3021
+ # client will throttle players.
3022
+ client_throttle_threshold: u8
3023
+ # ClientThrottleScalar is the scalar for client throttling. The scalar is the amount of players that are ticked
3024
+ # when throttling is enabled.
3025
+ client_throttle_scalar: lf32
3026
+
3027
+ # PlayerAuthInput is sent by the client to allow for server authoritative movement. It is used to synchronise
3028
+ # the player input with the position server-side.
3029
+ # The client sends this packet when the ServerAuthoritativeMovementMode field in the StartGame packet is set
3030
+ # to true, instead of the MovePlayer packet. The client will send this packet once every tick.
3031
+ packet_player_auth_input:
3032
+ !id: 0x90
3033
+ !bound: server
3034
+ # Pitch that the player reports it has.
3035
+ pitch: lf32
3036
+ # Yaw that player reports it has.
3037
+ yaw: lf32
3038
+ # Position holds the position that the player reports it has.
3039
+ position: vec3f
3040
+ # MoveVector is a Vec2 that specifies the direction in which the player moved, as a combination of X/Z
3041
+ # values which are created using the WASD/controller stick state.
3042
+ move_vector: vec2f
3043
+ # HeadYaw is the horizontal rotation of the head that the player reports it has.
3044
+ head_yaw: lf32
3045
+ # InputData is a combination of bit flags that together specify the way the player moved last tick. It
3046
+ # is a combination of the flags above.
3047
+ input_data: InputFlag
3048
+ # InputMode specifies the way that the client inputs data to the screen. It is one of the constants that
3049
+ # may be found above.
3050
+ input_mode: varint =>
3051
+ 0: unknown
3052
+ 1: mouse
3053
+ 2: touch
3054
+ 3: game_pad
3055
+ 4: motion_controller
3056
+ # PlayMode specifies the way that the player is playing. The values it holds, which are rather random,
3057
+ # may be found above.
3058
+ play_mode: varint =>
3059
+ 0: normal
3060
+ 1: teaser
3061
+ 2: screen
3062
+ 3: viewer
3063
+ 4: reality
3064
+ 5: placement
3065
+ 6: living_room
3066
+ 7: exit_level
3067
+ 8: exit_level_living_room
3068
+ 9: num_modes
3069
+ # InteractionModel is a constant representing the interaction model the player is using.
3070
+ interaction_model: zigzag32 =>
3071
+ - touch
3072
+ - crosshair
3073
+ - classic
3074
+ # GazeDirection is the direction in which the player is gazing, when the PlayMode is PlayModeReality: In
3075
+ # other words, when the player is playing in virtual reality.
3076
+ gaze_direction: play_mode ?
3077
+ if reality: vec3f
3078
+ # Tick is the server tick at which the packet was sent. It is used in relation to
3079
+ # CorrectPlayerMovePrediction.
3080
+ tick: varint64
3081
+ # Delta was the delta between the old and the new position. There isn't any practical use for this field
3082
+ # as it can be calculated by the server itself.
3083
+ delta: vec3f
3084
+ transaction: input_data.item_interact ?
3085
+ if true:
3086
+ legacy: TransactionLegacy
3087
+ actions: TransactionActions
3088
+ data: TransactionUseItem
3089
+ item_stack_request: input_data.item_stack_request ?
3090
+ if true: ItemStackRequest
3091
+ block_action: input_data.block_action ?
3092
+ if true: []zigzag32
3093
+ action: Action
3094
+ _: action?
3095
+ if start_break or abort_break or crack_break or predict_break or continue_break:
3096
+ # BlockPosition is the position of the target block, if the action with the ActionType set concerned a
3097
+ # block. If that is not the case, the block position will be zero.
3098
+ position: vec3i
3099
+ # BlockFace is the face of the target block that was touched. If the action with the ActionType set
3100
+ # concerned a block. If not, the face is always 0.
3101
+ face: zigzag32
3102
+ # AnalogueMoveVector is a Vec2 that specifies the direction in which the player moved, as a combination of X/Z
3103
+ # values which are created using an analogue input.
3104
+ analogue_move_vector: vec2f
3105
+
3106
+ #TODO: update to use the new `shift` option in bitflags
3107
+ InputFlag: [ "bitflags", {
3108
+ "type": "varint64", "big": true,
3109
+ "flags": [
3110
+ "ascend",
3111
+ "descend",
3112
+ "north_jump",
3113
+ "jump_down",
3114
+ "sprint_down",
3115
+ "change_height",
3116
+ "jumping",
3117
+ "auto_jumping_in_water",
3118
+ "sneaking",
3119
+ "sneak_down",
3120
+ "up",
3121
+ "down",
3122
+ "left",
3123
+ "right",
3124
+ "up_left",
3125
+ "up_right",
3126
+ "want_up",
3127
+ "want_down",
3128
+ "want_down_slow",
3129
+ "want_up_slow",
3130
+ "sprinting",
3131
+ "ascend_block",
3132
+ "descend_block",
3133
+ "sneak_toggle_down",
3134
+ "persist_sneak",
3135
+ "start_sprinting",
3136
+ "stop_sprinting",
3137
+ "start_sneaking",
3138
+ "stop_sneaking",
3139
+ "start_swimming",
3140
+ "stop_swimming",
3141
+ "start_jumping",
3142
+ "start_gliding",
3143
+ "stop_gliding",
3144
+ "item_interact",
3145
+ "block_action",
3146
+ "item_stack_request",
3147
+ "handled_teleport",
3148
+ "emoting",
3149
+ "missed_swing",
3150
+ "start_crawling",
3151
+ "stop_crawling",
3152
+ "start_flying",
3153
+ "stop_flying"
3154
+ ]
3155
+ }]
3156
+
3157
+ # CreativeContent is a packet sent by the server to set the creative inventory's content for a player.
3158
+ # Introduced in 1.16, this packet replaces the previous method - sending an InventoryContent packet with
3159
+ # creative inventory window ID.
3160
+ # As of v1.16.100, this packet must be sent during the login sequence. Not sending it will stop the client
3161
+ # from joining the server.
3162
+ packet_creative_content:
3163
+ !id: 0x91
3164
+ !bound: client
3165
+ # Items is a list of the items that should be added to the creative inventory.
3166
+ items: []varint
3167
+ entry_id: varint
3168
+ item: ItemLegacy
3169
+
3170
+ # PlayerEnchantOptions is sent by the server to update the enchantment options displayed when the user opens
3171
+ # the enchantment table and puts an item in. This packet was added in 1.16 and allows the server to decide on
3172
+ # the enchantments that can be selected by the player.
3173
+ # The PlayerEnchantOptions packet should be sent once for every slot update of the enchantment table. The
3174
+ # vanilla server sends an empty PlayerEnchantOptions packet when the player opens the enchantment table
3175
+ # (air is present in the enchantment table slot) and sends the packet with actual enchantments in it when
3176
+ # items are put in that can have enchantments.
3177
+ packet_player_enchant_options:
3178
+ !id: 0x92
3179
+ !bound: client
3180
+ # Options is a list of possible enchantment options for the item that was put into the enchantment table.
3181
+ options: EnchantOption[]varint
3182
+
3183
+ # ItemStackRequest is sent by the client to change item stacks in an inventory. It is essentially a
3184
+ # replacement of the InventoryTransaction packet added in 1.16 for inventory specific actions, such as moving
3185
+ # items around or crafting. The InventoryTransaction packet is still used for actions such as placing blocks
3186
+ # and interacting with entities.
3187
+ packet_item_stack_request:
3188
+ !id: 0x93
3189
+ !bound: server
3190
+ requests: ItemStackRequest[]varint
3191
+
3192
+ # ItemStackResponse is sent by the server in response to an ItemStackRequest packet from the client. This
3193
+ # packet is used to either approve or reject ItemStackRequests from the client. If a request is approved, the
3194
+ # client will simply continue as normal. If rejected, the client will undo the actions so that the inventory
3195
+ # should be in sync with the server again.
3196
+ packet_item_stack_response:
3197
+ !id: 0x94
3198
+ !bound: client
3199
+ # Responses is a list of responses to ItemStackRequests sent by the client before. Responses either
3200
+ # approve or reject a request from the client.
3201
+ # Vanilla limits the size of this slice to 4096.
3202
+ responses: ItemStackResponses
3203
+
3204
+ # PlayerArmourDamage is sent by the server to damage the armour of a player. It is a very efficient packet,
3205
+ # but generally it's much easier to just send a slot update for the damaged armour.
3206
+ packet_player_armor_damage:
3207
+ !id: 0x95
3208
+ !bound: client
3209
+ # Bitset holds a bitset of 4 bits that indicate which pieces of armour need to have damage dealt to them.
3210
+ # The first bit, when toggled, is for a helmet, the second for the chestplate, the third for the leggings
3211
+ # and the fourth for boots.
3212
+ type: ArmorDamageType
3213
+ helmet_damage: type.head ?
3214
+ if true: zigzag32
3215
+ chestplate_damage: type.chest ?
3216
+ if true: zigzag32
3217
+ leggings_damage: type.legs ?
3218
+ if true: zigzag32
3219
+ boots_damage: type.feet ?
3220
+ if true: zigzag32
3221
+
3222
+ ArmorDamageType: [ "bitflags",
3223
+ {
3224
+ "type": "u8",
3225
+ "flags": {
3226
+ "head": 0b1,
3227
+ "chest": 0b10,
3228
+ "legs": 0b100,
3229
+ "feet": 0b1000
3230
+ }
3231
+ }
3232
+ ]
3233
+
3234
+ # UpdatePlayerGameType is sent by the server to change the game mode of a player. It is functionally
3235
+ # identical to the SetPlayerGameType packet.
3236
+ packet_update_player_game_type:
3237
+ !id: 0x97
3238
+ !bound: client
3239
+ # GameType is the new game type of the player. It is one of the constants that can be found in
3240
+ # set_player_game_type.go. Some of these game types require additional flags to be set in an
3241
+ # AdventureSettings packet for the game mode to obtain its full functionality.
3242
+ gamemode: GameMode
3243
+ # PlayerUniqueID is the entity unique ID of the player that should have its game mode updated. If this
3244
+ # packet is sent to other clients with the player unique ID of another player, nothing happens.
3245
+ player_unique_id: zigzag64
3246
+
3247
+
3248
+ # EmoteList is sent by the client every time it joins the server and when it equips new emotes. It may be
3249
+ # used by the server to find out which emotes the client has available. If the player has no emotes equipped,
3250
+ # this packet is not sent.
3251
+ # Under certain circumstances, this packet is also sent from the server to the client, but I was unable to
3252
+ # find when this is done.
3253
+ packet_emote_list:
3254
+ !id: 0x98
3255
+ !bound: server
3256
+ # PlayerRuntimeID is the runtime ID of the player that owns the emote pieces below. If sent by the
3257
+ # client, this player runtime ID is always that of the player itself.
3258
+ player_id: varint64
3259
+ # EmotePieces is a list of emote pieces that the player with the runtime ID above has.
3260
+ emote_pieces: uuid[]varint
3261
+
3262
+ # PositionTrackingDBClientRequest is a packet sent by the client to request the position and dimension of a
3263
+ # 'tracking ID'. These IDs are tracked in a database by the server. In 1.16, this is used for lodestones.
3264
+ # The client will send this request to find the position a lodestone compass needs to point to. If found, it
3265
+ # will point to the lodestone. If not, it will start spinning around.
3266
+ # A PositionTrackingDBServerBroadcast packet should be sent in response to this packet.
3267
+ packet_position_tracking_db_request:
3268
+ !id: 0x9a
3269
+ !bound: server
3270
+ # RequestAction is the action that should be performed upon the receiving of the packet. It is one of the
3271
+ # constants found above.
3272
+ action: u8 =>
3273
+ 0: query
3274
+ # TrackingID is a unique ID used to identify the request. The server responds with a
3275
+ # PositionTrackingDBServerBroadcast packet holding the same ID, so that the client can find out what that
3276
+ # packet was in response to.
3277
+ tracking_id: zigzag32
3278
+
3279
+ # PositionTrackingDBServerBroadcast is sent by the server in response to the
3280
+ # PositionTrackingDBClientRequest packet. This packet is, as of 1.16, currently only used for lodestones. The
3281
+ # server maintains a database with tracking IDs and their position and dimension. The client will request
3282
+ # these tracking IDs, (NBT tag set on the lodestone compass with the tracking ID?) and the server will
3283
+ # respond with the status of those tracking IDs.
3284
+ # What is actually done with the data sent depends on what the client chooses to do with it. For the
3285
+ # lodestone compass, it is used to make the compass point towards lodestones and to make it spin if the
3286
+ # lodestone at a position is no longer there.
3287
+ packet_position_tracking_db_broadcast:
3288
+ !id: 0x99
3289
+ !bound: client
3290
+ # BroadcastAction specifies the status of the position tracking DB response. It is one of the constants
3291
+ # above, specifying the result of the request with the ID below.
3292
+ # The Update action is sent for setting the position of a lodestone compass, the Destroy and NotFound to
3293
+ # indicate that there is not (no longer) a lodestone at that position.
3294
+ broadcast_action: u8 =>
3295
+ 0: update
3296
+ 1: destory
3297
+ 2: not_found
3298
+ # TrackingID is the ID of the PositionTrackingDBClientRequest packet that this packet was in response to.
3299
+ # The tracking ID is also present as the 'id' field in the SerialisedData field.
3300
+ tracking_id: zigzag32
3301
+ nbt: nbt
3302
+
3303
+ # PacketViolationWarning is sent by the client when it receives an invalid packet from the server. It holds
3304
+ # some information on the error that occurred.
3305
+ packet_packet_violation_warning:
3306
+ !id: 0x9c
3307
+ !bound: server
3308
+ violation_type: zigzag32 =>
3309
+ 0: malformed
3310
+ # Severity specifies the severity of the packet violation. The action the client takes after this
3311
+ # violation depends on the severity sent.
3312
+ severity: zigzag32 =>
3313
+ 0: warning
3314
+ 1: final_warning
3315
+ 2: terminating
3316
+ # PacketID is the ID of the invalid packet that was received.
3317
+ packet_id: zigzag32
3318
+ # ViolationContext holds a description on the violation of the packet.
3319
+ reason: string
3320
+
3321
+
3322
+ # MotionPredictionHints is sent by the server to the client. There is a predictive movement component for
3323
+ # entities. This packet fills the "history" of that component and entity movement is computed based on the
3324
+ # points. Vanilla sends this packet instead of the SetActorMotion packet when 'spatial optimisations' are
3325
+ # enabled.
3326
+ packet_motion_prediction_hints:
3327
+ !id: 0x9d
3328
+ !bound: client
3329
+ # EntityRuntimeID is the runtime ID of the entity whose velocity is sent to the client.
3330
+ entity_runtime_id: varint64
3331
+ # Velocity is the server-calculated velocity of the entity at the point of sending the packet.
3332
+ velocity: vec3f
3333
+ # OnGround specifies if the server currently thinks the entity is on the ground.
3334
+ on_ground: bool
3335
+
3336
+
3337
+ # AnimateEntity is sent by the server to animate an entity client-side. It may be used to play a single
3338
+ # animation, or to activate a controller which can start a sequence of animations based on different
3339
+ # conditions specified in an animation controller.
3340
+ # Much of the documentation of this packet can be found at
3341
+ # https://learn.microsoft.com/minecraft/creator/reference/content/animationsreference.
3342
+ packet_animate_entity:
3343
+ !id: 0x9e
3344
+ !bound: client
3345
+ # Animation is the name of a single animation to start playing.
3346
+ animation: string
3347
+ # NextState is the first state to start with. These states are declared in animation controllers (which,
3348
+ # in themselves, are animations too). These states in turn may have animations and transitions to move to
3349
+ # a next state.
3350
+ next_state: string
3351
+ # StopCondition is a MoLang expression that specifies when the animation should be stopped.
3352
+ stop_condition: string
3353
+ # StopConditionVersion is the MoLang stop condition version.
3354
+ stop_condition_version: li32
3355
+ # Controller is the animation controller that is used to manage animations. These controllers decide when
3356
+ # to play which animation.
3357
+ controller: string
3358
+ # How long to move from the previous animation to the next.
3359
+ blend_out_time: lf32
3360
+ # EntityRuntimeIDs is list of runtime IDs of entities that the animation should be applied to.
3361
+ runtime_entity_ids: varint64[]varint
3362
+
3363
+ # CameraShake is sent by the server to make the camera shake client-side. This feature was added for map-
3364
+ # making partners.
3365
+ packet_camera_shake:
3366
+ !id: 0x9f
3367
+ !bound: client
3368
+ # Intensity is the intensity of the shaking. The client limits this value to 4, so anything higher may
3369
+ # not work.
3370
+ intensity: lf32
3371
+ # Duration is the number of seconds the camera will shake for.
3372
+ duration: lf32
3373
+ # Type is the type of shake, and is one of the constants listed above. The different type affects how
3374
+ # the shake looks in game.
3375
+ type: u8
3376
+ # Action is the action to be performed, and is one of the constants listed above. Currently the
3377
+ # different actions will either add or stop shaking the client.
3378
+ action: u8 =>
3379
+ 0: add
3380
+ 1: stop
3381
+
3382
+ # PlayerFog is sent by the server to render the different fogs in the Stack. The types of fog are controlled
3383
+ # by resource packs to change how they are rendered, and the ability to create custom fog.
3384
+ packet_player_fog:
3385
+ !id: 0xa0
3386
+ !bound: client
3387
+ # Stack is a list of fog identifiers to be sent to the client. Examples of fog identifiers are
3388
+ # "minecraft:fog_ocean" and "minecraft:fog_hell".
3389
+ stack: string[]varint
3390
+
3391
+
3392
+ # CorrectPlayerMovePrediction is sent by the server if and only if StartGame.ServerAuthoritativeMovementMode
3393
+ # is set to AuthoritativeMovementModeServerWithRewind. The packet is used to correct movement at a specific
3394
+ # point in time.
3395
+ packet_correct_player_move_prediction:
3396
+ !id: 0xa1
3397
+ !bound: client
3398
+ # Position is the position that the player is supposed to be at at the tick written in the field below.
3399
+ # The client will change its current position based on movement after that tick starting from the
3400
+ # Position.
3401
+ position: vec3f
3402
+ # Delta is the change in position compared to what the client sent as its position at that specific tick.
3403
+ delta: vec3f
3404
+ # OnGround specifies if the player was on the ground at the time of the tick below.
3405
+ on_ground: bool
3406
+ # Tick is the tick of the movement which was corrected by this packet.
3407
+ tick: varint64
3408
+
3409
+ # ItemComponent is sent by the server to attach client-side components to a custom item.
3410
+ packet_item_component:
3411
+ !id: 0xa2
3412
+ !bound: client
3413
+ # `entries` holds a list of all custom items with their respective components set.
3414
+ entries: ItemComponentList
3415
+
3416
+ # FilterText is sent by the both the client and the server. The client sends the packet to the server to
3417
+ # allow the server to filter the text server-side. The server then responds with the same packet and the
3418
+ # safer version of the text.
3419
+ packet_filter_text_packet:
3420
+ !id: 0xa3
3421
+ !bound: both
3422
+ # Text is either the text from the client or the safer version of the text sent by the server.
3423
+ text: string
3424
+ # FromServer indicates if the packet was sent by the server or not.
3425
+ from_server: bool
3426
+
3427
+ # ClientBoundDebugRenderer is sent by the server to spawn an outlined cube on client-side.
3428
+ packet_debug_renderer:
3429
+ !id: 0xa4
3430
+ !bound: client
3431
+ # Type is the type of action. It is one of the constants above.
3432
+ type: li32 =>
3433
+ 1: clear
3434
+ 2: add_cube
3435
+ _: type ?
3436
+ if clear: void
3437
+ if add_cube:
3438
+ # Text is the text that is displayed above the debug.
3439
+ text: string
3440
+ # Position is the position to spawn the debug on.
3441
+ position: vec3f
3442
+ # Red is the red value from the RGBA colour rendered on the debug.
3443
+ red: lf32
3444
+ # Green is the green value from the RGBA colour rendered on the debug.
3445
+ green: lf32
3446
+ # Blue is the blue value from the RGBA colour rendered on the debug.
3447
+ blue: lf32
3448
+ # Alpha is the alpha value from the RGBA colour rendered on the debug.
3449
+ alpha: lf32
3450
+ # Duration is how long the debug will last in the world for. It is measured in milliseconds.
3451
+ duration: li64
3452
+
3453
+ # Sent by the server to synchronize/update entity properties as NBT, an alternative to Set Entity Data.
3454
+ packet_sync_entity_property:
3455
+ !id: 0xa5
3456
+ !bound: client
3457
+ nbt: nbt
3458
+
3459
+ # AddVolumeEntity sends a volume entity's definition and components from server to client.
3460
+ packet_add_volume_entity:
3461
+ !id: 0xa6
3462
+ !bound: client
3463
+ # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and
3464
+ # entities are generally identified in packets using this runtime ID.
3465
+ runtime_id: varint64
3466
+ # EntityMetadata is a map of entity metadata, which includes flags and data properties that alter in
3467
+ # particular the way the entity looks.
3468
+ nbt: nbt
3469
+ encoding_identifier: string
3470
+ instance_name: string
3471
+ bounds:
3472
+ min: BlockCoordinates
3473
+ max: BlockCoordinates
3474
+ dimension: zigzag32
3475
+ engine_version: string
3476
+
3477
+ # RemoveVolumeEntity indicates a volume entity to be removed from server to client.
3478
+ packet_remove_volume_entity:
3479
+ !id: 0xa7
3480
+ !bound: client
3481
+ # The Runtime Entity ID
3482
+ entity_id: varint64
3483
+
3484
+ # SimulationType is an in-progress packet. We currently do not know the use case.
3485
+ packet_simulation_type:
3486
+ !id: 0xa8
3487
+ # SimulationType is the simulation type selected
3488
+ type: u8 =>
3489
+ 0: game
3490
+ 1: editor
3491
+ 2: test
3492
+ 3: invalid
3493
+
3494
+ # NPCDialogue is a packet that allows the client to display dialog boxes for interacting with NPCs.
3495
+ packet_npc_dialogue:
3496
+ !id: 0xa9
3497
+ !bound: client
3498
+ # ActorUniqueID is the ID of the NPC being requested.
3499
+ entity_id: lu64
3500
+ # ActionType is the type of action for the packet.
3501
+ action_type: varint =>
3502
+ 0: open
3503
+ 1: close
3504
+ # Dialogue is the text that the client should see.
3505
+ dialogue: string
3506
+ # SceneName is the scene the data was pulled from for the client.
3507
+ screen_name: string
3508
+ # NPCName is the name of the NPC to be displayed to the client.
3509
+ npc_name: string
3510
+ # ActionJSON is the JSON string of the buttons/actions the server can perform.
3511
+ action_json: string
3512
+
3513
+ packet_edu_uri_resource_packet:
3514
+ !id: 0xaa
3515
+ resource: EducationSharedResourceURI
3516
+
3517
+ # CreatePhoto is a packet that allows players to export photos from their portfolios into items in their inventory.
3518
+ # This packet only works on the Education Edition version of Minecraft.
3519
+ packet_create_photo:
3520
+ !id: 0xab
3521
+ !bound: client
3522
+ # EntityUniqueID is the unique ID of the entity.
3523
+ entity_unique_id: li64
3524
+ # PhotoName is the name of the photo.
3525
+ photo_name: string
3526
+ # ItemName is the name of the photo as an item.
3527
+ item_name: string
3528
+
3529
+ # UpdateSubChunkBlocks is essentially just UpdateBlock packet, however for a set of blocks in a sub chunk.
3530
+ packet_update_subchunk_blocks:
3531
+ !id: 0xac
3532
+ !bound: client
3533
+ # SubChunkX, SubChunkY, and SubChunkZ help identify the sub chunk.
3534
+ x: zigzag32
3535
+ y: zigzag32
3536
+ z: zigzag32
3537
+ # Blocks contains each updated block change entry.
3538
+ blocks: BlockUpdate[]varint
3539
+ # Extra contains each updated block change entry for the second layer, usually for waterlogged blocks.
3540
+ extra: BlockUpdate[]varint
3541
+
3542
+ packet_photo_info_request:
3543
+ !id: 0xad
3544
+ !bound: server
3545
+ photo_id: zigzag64
3546
+
3547
+ SubChunkEntryWithoutCaching: []lu32
3548
+ dx: i8
3549
+ dy: i8
3550
+ dz: i8
3551
+ result: u8 =>
3552
+ 0: undefined
3553
+ 1: success
3554
+ 2: chunk_not_found
3555
+ 3: invalid_dimension
3556
+ 4: player_not_found
3557
+ 5: y_index_out_of_bounds
3558
+ 6: success_all_air
3559
+ # Payload has the terrain data, if the chunk isn't empty and caching is disabled
3560
+ payload: ByteArray
3561
+ heightmap_type: u8 =>
3562
+ 0: no_data
3563
+ 1: has_data
3564
+ 2: too_high
3565
+ 3: too_low
3566
+ heightmap: heightmap_type ?
3567
+ if has_data: '["buffer", { "count": 256 }]'
3568
+
3569
+ SubChunkEntryWithCaching: []lu32
3570
+ dx: i8
3571
+ dy: i8
3572
+ dz: i8
3573
+ result: u8 =>
3574
+ 0: undefined
3575
+ 1: success
3576
+ 2: chunk_not_found
3577
+ 3: invalid_dimension
3578
+ 4: player_not_found
3579
+ 5: y_index_out_of_bounds
3580
+ 6: success_all_air
3581
+ # Payload has the terrain data, if the chunk isn't empty and caching is disabled
3582
+ payload: result ?
3583
+ if success_all_air: void
3584
+ default: ByteArray
3585
+ heightmap_type: u8 =>
3586
+ 0: no_data
3587
+ 1: has_data
3588
+ 2: too_high
3589
+ 3: too_low
3590
+ heightmap: heightmap_type ?
3591
+ if has_data: '["buffer", { "count": 256 }]'
3592
+ blob_id: lu64
3593
+
3594
+ # SubChunk sends data about multiple sub-chunks around a center point.
3595
+ packet_subchunk:
3596
+ !id: 0xae
3597
+ !bound: client
3598
+ cache_enabled: bool
3599
+ dimension: zigzag32
3600
+ # Origin point
3601
+ origin: vec3i
3602
+ entries: cache_enabled ?
3603
+ if true: SubChunkEntryWithCaching
3604
+ if false: SubChunkEntryWithoutCaching
3605
+
3606
+ packet_subchunk_request:
3607
+ !id: 0xaf
3608
+ !bound: server
3609
+ dimension: zigzag32
3610
+ # Origin point
3611
+ origin: vec3i
3612
+ requests: []lu32
3613
+ dx: i8
3614
+ dy: i8
3615
+ dz: i8
3616
+
3617
+ # ClientStartItemCooldown is sent by the client to the server to initiate a cooldown on an item. The purpose of this
3618
+ # packet isn't entirely clear.
3619
+ packet_client_start_item_cooldown:
3620
+ !id: 0xb0
3621
+ !bound: server
3622
+ category: string
3623
+ # Duration is the duration of ticks the cooldown should last.
3624
+ duration: zigzag32
3625
+
3626
+ # ScriptMessage is used to communicate custom messages from the client to the server, or from the server to the client.
3627
+ # While the name may suggest this packet is used for the discontinued scripting API, it is likely instead for the
3628
+ # GameTest framework.
3629
+ packet_script_message:
3630
+ !id: 0xb1
3631
+ !bound: server
3632
+ # Message ID is the identifier of the message, used by either party to identify the message data sent.
3633
+ message_id: string
3634
+ # Data contains the data of the message.
3635
+ data: string
3636
+
3637
+ # CodeBuilderSource is an Education Edition packet sent by the client to the server to run an operation with a
3638
+ packet_code_builder_source:
3639
+ !id: 0xb2
3640
+ !bound: server
3641
+ # Operation is used to distinguish the operation performed. It is always one of the constants listed above.
3642
+ operation: u8 =>
3643
+ - none
3644
+ - get
3645
+ - set
3646
+ - reset
3647
+ # Category is used to distinguish the category of the operation performed. It is always one of the constants
3648
+ category: u8 =>
3649
+ - none
3650
+ - code_status
3651
+ - instantiation
3652
+ # Value contains extra data about the operation performed. It is always empty unless the operation is
3653
+ value: string
3654
+
3655
+ # TickingAreasLoadStatus is sent by the server to the client to notify the client of a ticking area's loading status.
3656
+ packet_ticking_areas_load_status:
3657
+ !id: 0xb3
3658
+ !bound: client
3659
+ # Preload is true if the server is waiting for the area's preload.
3660
+ preload: bool
3661
+
3662
+ # DimensionData is a packet sent from the server to the client containing information about data-driven dimensions
3663
+ # that the server may have registered. This packet does not seem to be sent by default, rather only being sent when
3664
+ # any data-driven dimensions are registered.
3665
+ packet_dimension_data:
3666
+ !id: 0xb4
3667
+ !bound: client
3668
+ definitions: []varint
3669
+ id: string
3670
+ max_height: zigzag32
3671
+ min_height: zigzag32
3672
+ generator: zigzag32 =>
3673
+ 0: legacy
3674
+ 1: overworld
3675
+ 2: flat
3676
+ 3: nether
3677
+ 4: end
3678
+ 5: void
3679
+
3680
+ # AgentAction is an Education Edition packet sent from the server to the client to return a response to a
3681
+ # previously requested action.
3682
+ packet_agent_action:
3683
+ !id: 0xb5
3684
+ !bound: client
3685
+ request_id: string
3686
+ action_type: zigzag32 =>
3687
+ - none
3688
+ - attack
3689
+ - collect
3690
+ - destroy
3691
+ - detect_redstone
3692
+ - detect_obstacle
3693
+ - drop
3694
+ - drop_all
3695
+ - inspect
3696
+ - inspect_data
3697
+ - inspect_item_count
3698
+ - inspect_item_detail
3699
+ - inspect_item_space
3700
+ - interact
3701
+ - move
3702
+ - place_block
3703
+ - till
3704
+ - transfer_item_to
3705
+ - turn
3706
+ body: string
3707
+
3708
+ # ChangeMobProperty is a packet sent from the server to the client to change one of the properties of a mob client-side.
3709
+ packet_change_mob_property:
3710
+ !id: 0xb6
3711
+ !bound: client
3712
+ # EntityUniqueID is the unique ID of the entity whose property is being changed.
3713
+ entity_unique_id: zigzag64
3714
+ # Property is the name of the property being updated.
3715
+ property: string
3716
+ # BoolValue is set if the property value is a bool type. If the type is not a bool, this field is ignored.
3717
+ bool_value: bool
3718
+ # StringValue is set if the property value is a string type. If the type is not a string, this field is ignored.
3719
+ string_value: string
3720
+ # IntValue is set if the property value is an int type. If the type is not an int, this field is ignored.
3721
+ int_value: zigzag32
3722
+ # FloatValue is set if the property value is a float type. If the type is not a float, this field is ignored.
3723
+ float_value: lf32
3724
+
3725
+ # LessonProgress is a packet sent by the server to the client to inform the client of updated progress on a lesson.
3726
+ # This packet only functions on the Minecraft: Education Edition version of the game.
3727
+ packet_lesson_progress:
3728
+ !id: 0xb7
3729
+ !bound: client
3730
+ # Action is the action the client should perform to show progress. This is one of the constants defined above.
3731
+ action: u8
3732
+ # Score is the score the client should use when displaying the progress.
3733
+ score: zigzag32
3734
+ # Identifier is the identifier of the lesson that is being progressed.
3735
+ identifier: string
3736
+
3737
+ # RequestAbility is a packet sent by the client to the server to request permission for a specific ability from the
3738
+ # server.
3739
+ packet_request_ability:
3740
+ !id: 0xb8
3741
+ !bound: server
3742
+ # Ability is the ability that the client is requesting. This is one of the constants defined above.
3743
+ ability: zigzag32 =>
3744
+ - build
3745
+ - mine
3746
+ - doors_and_switches
3747
+ - open_containers
3748
+ - attack_players
3749
+ - attack_mobs
3750
+ - operator_commands
3751
+ - teleport
3752
+ - invulnerable
3753
+ - flying
3754
+ - may_fly
3755
+ - instant_build
3756
+ - lightning
3757
+ - fly_speed
3758
+ - walk_speed
3759
+ - muted
3760
+ - world_builder
3761
+ - no_clip
3762
+ - ability_count
3763
+ # Value type decides which of the fields you should read/write from
3764
+ value_type: u8 =>
3765
+ 1: bool
3766
+ 2: float
3767
+ # If value type is bool, use this value
3768
+ bool_value: bool
3769
+ # If value type is float, use this value
3770
+ float_val: lf32
3771
+
3772
+ # RequestPermissions is a packet sent from the client to the server to request permissions that the client does not
3773
+ # currently have. It can only be sent by operators and host in vanilla Minecraft.
3774
+ packet_request_permissions:
3775
+ !id: 0xb9
3776
+ !bound: server
3777
+ # EntityUniqueID is the unique ID of the player. The unique ID is unique for the entire world and is
3778
+ # often used in packets. Most servers send an EntityUniqueID equal to the EntityRuntimeID.
3779
+ entity_unique_id: li64
3780
+ # PermissionLevel is the current permission level of the player. Same as constants in AdventureSettings packet.
3781
+ permission_level: PermissionLevel
3782
+ # RequestedPermissions contains the requested permission flags.
3783
+ requested_permissions: RequestPermissions
3784
+
3785
+ RequestPermissions: [ "bitflags",
3786
+ {
3787
+ "type": "lu16",
3788
+ "flags": {
3789
+ "build": 0b1,
3790
+ "mine": 0b10,
3791
+ "doors_and_switches": 0b100,
3792
+ "open_containers": 0b1000,
3793
+ "attack_players": 0b10000,
3794
+ "attack_mobs": 0b100000,
3795
+ "operator": 0b1000000,
3796
+ "teleport": 0b10000000
3797
+ }
3798
+ }
3799
+ ]
3800
+
3801
+ # ToastRequest is a packet sent from the server to the client to display a toast to the top of the screen. These toasts
3802
+ # are the same as the ones seen when, for example, loading a new resource pack or obtaining an achievement.
3803
+ packet_toast_request:
3804
+ !id: 0xba
3805
+ !bound: client
3806
+ # Title is the title of the toast.
3807
+ title: string
3808
+ # Message is the message that the toast may contain alongside the title.
3809
+ message: string
3810
+
3811
+ # UpdateAbilities is a packet sent from the server to the client to update the abilities of the player. It, along with
3812
+ # the UpdateAdventureSettings packet, are replacements of the AdventureSettings packet since v1.19.10.
3813
+ packet_update_abilities:
3814
+ !id: 0xbb
3815
+ !bound: client
3816
+ # EntityUniqueID is the unique ID of the player. The unique ID is a value that remains consistent across
3817
+ # different sessions of the same world, but most servers simply fill the runtime ID of the entity out for
3818
+ # this field.
3819
+ entity_unique_id: li64
3820
+ # PlayerPermissions is the permission level of the player. It is a value from 0-3, with 0 being visitor,
3821
+ # 1 being member, 2 being operator and 3 being custom.
3822
+ permission_level: PermissionLevel
3823
+ # CommandPermissions is a permission level that specifies the kind of commands that the player is
3824
+ # allowed to use. It is one of the CommandPermissionLevel constants in the AdventureSettings packet.
3825
+ command_permission: CommandPermissionLevel
3826
+ # Layers contains all ability layers and their potential values. This should at least have one entry, being the
3827
+ # base layer.
3828
+ abilities: AbilityLayers[]u8
3829
+
3830
+ # UpdateAdventureSettings is a packet sent from the server to the client to update the adventure settings of the player.
3831
+ # It, along with the UpdateAbilities packet, are replacements of the AdventureSettings packet since v1.19.10.
3832
+ packet_update_adventure_settings:
3833
+ !id: 0xbc
3834
+ !bound: client
3835
+ # NoPvM is a boolean indicating whether the player is allowed to fight mobs or not.
3836
+ no_pvm: bool
3837
+ # NoMvP is a boolean indicating whether mobs are allowed to fight the player or not. It is unclear why this is sent
3838
+ # to the client.
3839
+ no_mvp: bool
3840
+ # ImmutableWorld is a boolean indicating whether the player is allowed to modify the world or not.
3841
+ immutable_world: bool
3842
+ # ShowNameTags is a boolean indicating whether player name tags are shown or not.
3843
+ show_name_tags: bool
3844
+ # AutoJump is a boolean indicating whether the player is allowed to jump automatically or not.
3845
+ auto_jump: bool
3846
+
3847
+ # DeathInfo is a packet sent from the server to the client expected to be sent when a player dies. It contains messages
3848
+ # related to the player's death, which are shown on the death screen as of v1.19.10.
3849
+ packet_death_info:
3850
+ !id: 0xbd
3851
+ !bound: client
3852
+ # Cause is the cause of the player's death, such as "suffocation" or "suicide".
3853
+ cause: string
3854
+ # Messages is a list of death messages to be shown on the death screen.
3855
+ messages: string[]varint
3856
+
3857
+ # EditorNetwork is a packet sent from the server to the client and vise-versa to communicate editor-mode related
3858
+ # information. It carries a single compound tag containing the relevant information.
3859
+ packet_editor_network:
3860
+ !id: 0xbe
3861
+ !bound: client
3862
+ # Payload is a network little endian compound tag holding data relevant to the editor.
3863
+ payload: nbt
3864
+
3865
+ # FeatureRegistry is a packet used to notify the client about the world generation features the server is currently
3866
+ # using. This is used in combination with the client-side world generation system introduced in v1.19.20, allowing the
3867
+ # client to completely generate the chunks of the world without having to rely on the server.
3868
+ packet_feature_registry:
3869
+ !id: 0xbf
3870
+ !bound: client
3871
+ # Features is a slice of all registered world generation features.
3872
+ features: []varint
3873
+ name: string
3874
+ options: string
3875
+
3876
+ # ServerStats is a packet sent from the server to the client to update the client on server statistics. It is purely
3877
+ # used for telemetry.
3878
+ packet_server_stats:
3879
+ !id: 0xc0
3880
+ !bound: client
3881
+ server_time: lf32
3882
+ network_time: lf32
3883
+
3884
+ packet_request_network_settings:
3885
+ !id: 0xc1
3886
+ !bound: server
3887
+ client_protocol: i32
3888
+
3889
+ packet_game_test_request:
3890
+ !id: 0xc2
3891
+ !bound: server
3892
+ # MaxTestsPerBatch ...
3893
+ max_tests_per_batch: varint
3894
+ # Repetitions represents the amount of times the test will be run.
3895
+ repetitions: varint
3896
+ # Rotation represents the rotation of the test. It is one of the constants above.
3897
+ rotation: u8 =>
3898
+ - 0deg
3899
+ - 90deg
3900
+ - 180deg
3901
+ - 270deg
3902
+ - 360deg
3903
+ # StopOnError indicates whether the test should immediately stop when an error is encountered.
3904
+ stop_on_error: bool
3905
+ # Position is the position at which the test will be performed.
3906
+ position: BlockCoordinates
3907
+ # TestsPerRow ...
3908
+ tests_per_row: varint
3909
+ # Name represents the name of the test.
3910
+ name: string
3911
+
3912
+ # GameTestResults is a packet sent in response to the GameTestRequest packet, with a boolean indicating whether the
3913
+ # test was successful or not, and an error string if the test failed.
3914
+ packet_game_test_results:
3915
+ !id: 0xc3
3916
+ !bound: client
3917
+ # Succeeded indicates whether the test succeeded or not.
3918
+ succeeded: bool
3919
+ # Error is the error that occurred. If Succeeded is true, this field is empty.
3920
+ error: string
3921
+ # Name represents the name of the test.
3922
+ name: string
3923
+
3924
+ InputLockFlags: [ "bitflags", {
3925
+ "type": "varint",
3926
+ "flags": {
3927
+ "move": 0x02,
3928
+ "jump": 0x04,
3929
+ "sneak": 0x08,
3930
+ "mount": 0x10,
3931
+ "dismount": 0x20,
3932
+ "rotation": 0x40
3933
+ }
3934
+ } ]
3935
+
3936
+ packet_update_client_input_locks:
3937
+ !id: 0xc4
3938
+ !bound: client
3939
+ # Locks is an encoded bitset of all locks that are currently active. The locks are defined in the constants above.
3940
+ locks: InputLockFlags
3941
+ # Position is the server's position of the client at the time the packet was sent. It is unclear what the exact
3942
+ # purpose of this field is.
3943
+ position: vec3f
3944
+
3945
+ # Deprecated: ClientCheatAbility is deprecated as of 1.20.10.
3946
+ packet_client_cheat_ability:
3947
+ !id: 0xc5
3948
+ !bound: client
3949
+ # EntityUniqueID is the unique ID of the player. The unique ID is a value that remains consistent across
3950
+ # different sessions of the same world, but most servers simply fill the runtime ID of the entity out for
3951
+ # this field.
3952
+ entity_unique_id: li64
3953
+ # PlayerPermissions is the permission level of the player. It is a value from 0-3, with 0 being visitor,
3954
+ # 1 being member, 2 being operator and 3 being custom.
3955
+ permission_level: PermissionLevel
3956
+ # CommandPermissions is a permission level that specifies the kind of commands that the player is
3957
+ # allowed to use. It is one of the CommandPermissionLevel constants in the AdventureSettings packet.
3958
+ command_permission: CommandPermissionLevel
3959
+ # Layers contains all ability layers and their potential values. This should at least have one entry, being the
3960
+ # base layer.
3961
+ abilities: AbilityLayers[]u8
3962
+
3963
+ # camera_presets gives the client a list of custom camera presets.
3964
+ packet_camera_presets:
3965
+ !id: 0xc6
3966
+ !bound: client
3967
+ presets: CameraPresets[]varint
3968
+
3969
+ # unlocked_recipes gives the client a list of recipes that have been unlocked, restricting the recipes that appear in
3970
+ # the recipe book.
3971
+ packet_unlocked_recipes:
3972
+ !id: 0xc7
3973
+ !bound: client
3974
+ # new_unlocks determines if new recipes have been unlocked since the packet was last sent.
3975
+ unlock_type: lu32 =>
3976
+ - empty
3977
+ - initially_unlocked
3978
+ - newly_unlocked
3979
+ - remove_unlocked
3980
+ - remove_all_unlocked
3981
+ # Recipes is a list of recipe names that have been unlocked.
3982
+ recipes: string[]varint
3983
+
3984
+ # camera_instruction gives a custom camera specific instructions to operate.
3985
+ packet_camera_instruction:
3986
+ !id: 0x12c
3987
+ !bound: client
3988
+ # Instruction Set is a camera instruction that sets the camera to a specified preset.
3989
+ instruction_set?:
3990
+ # Preset is the index of the preset in the CameraPresets packet sent to the player.
3991
+ runtime_id: li32
3992
+ # Ease represents the easing function that is used by the instruction.
3993
+ ease_data?:
3994
+ type: u8 =>
3995
+ - Linear
3996
+ - Spring
3997
+ - InQuad
3998
+ - OutQuad
3999
+ - InOutQuad
4000
+ - InCubic
4001
+ - OutCubic
4002
+ - InOutCubic
4003
+ - InQuart
4004
+ - OutQuart
4005
+ - InOutQuart
4006
+ - InQuint
4007
+ - OutQuint
4008
+ - InOutQuint
4009
+ - InSine
4010
+ - OutSine
4011
+ - InOutSine
4012
+ - InExpo
4013
+ - OutExpo
4014
+ - InOutExpo
4015
+ - InCirc
4016
+ - OutCirc
4017
+ - InOutCirc
4018
+ - InBounce
4019
+ - OutBounce
4020
+ - InOutBounce
4021
+ - InBack
4022
+ - OutBack
4023
+ - InOutBack
4024
+ - InElastic
4025
+ - OutElastic
4026
+ - InOutElastic
4027
+ duration: lf32
4028
+ position?: vec3f
4029
+ rotation?: vec2f
4030
+ facing?: vec3f
4031
+ default?: bool
4032
+ clear?: bool
4033
+ fade?:
4034
+ fade_in_duration: lf32
4035
+ wait_duration: lf32
4036
+ fade_out_duration: lf32
4037
+ color_rgb: vec3f
4038
+
4039
+
4040
+ packet_compressed_biome_definitions:
4041
+ !id: 0x12d
4042
+ !bound: client
4043
+ # via PMMP:
4044
+ # This packet is only sent by the server when client-side chunk generation is enabled in vanilla. It contains NBT data
4045
+ # for biomes, similar to the BiomeDefinitionListPacket, but with a large amount of extra data for client-side chunk
4046
+ # generation.
4047
+ #
4048
+ # The data is compressed with a cursed home-brewed compression format, and it's a miracle it even works.
4049
+ raw_payload: string
4050
+
4051
+ packet_trim_data:
4052
+ !id: 0x12e
4053
+ !bound: client
4054
+ patterns: []varint
4055
+ item_name: string
4056
+ pattern: string
4057
+ materials: []varint
4058
+ material: string
4059
+ color: string
4060
+ item_name: string
4061
+
4062
+ packet_open_sign:
4063
+ !id: 0x12f
4064
+ !bound: client
4065
+ position: BlockCoordinates
4066
+ is_front: bool
4067
+
4068
+ # agent_animation is an Education Edition packet sent from the server to the client to make an agent perform an animation.
4069
+ packet_agent_animation:
4070
+ !id: 0x130
4071
+ !bound: client
4072
+ # animation is the ID of the animation that the agent should perform. As of its implementation, there are no IDs
4073
+ # that can be used in the regular client.
4074
+ animation: u8 =>
4075
+ 0: arm_swing
4076
+ 1: shrug
4077
+ # entity_runtime_id is the runtime ID of the entity. The runtime ID is unique for each world session, and
4078
+ # entities are generally identified in packets using this runtime ID.
4079
+ entity_runtime_id: varint64
4080
+
4081
+ # RefreshEntitlements is sent by the client to the server to refresh the entitlements of the player.
4082
+ packet_refresh_entitlements:
4083
+ !id: 0x131
4084
+ !bound: server