minecraft-data 3.3.0 → 3.4.0

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