minecraft-data 2.112.0 → 2.113.2

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