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