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