minecraft-data 3.9.0 → 3.10.2

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