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