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