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