minecraft-data 3.16.0 → 3.17.0

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