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