minecraft-data 3.60.0 → 3.61.1

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