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