minecraft-data 3.4.0 → 3.6.0

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