minecraft-data 2.95.0 → 2.98.1

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