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