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