Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(1.21.2 new packets.)
m (Mark ID Set as added.)
Line 26: Line 26:
 
Represents a set of IDs in a certain registry (implied by context), either directly (enumerated IDs) or indirectly (tag name).
 
Represents a set of IDs in a certain registry (implied by context), either directly (enumerated IDs) or indirectly (tag name).
  
{| class="wikitable"
+
{| class="wikitable" {{added}}
 
  ! Name
 
  ! Name
 
  ! Type
 
  ! Type

Revision as of 04:16, 1 November 2024

This page documents the changes from release 1.21.1 (protocol 767) to the current release (1.21.3, protocol 768). The stable protocol documentation is currently lagging behind, and the changes documented here will be merged soon, once they are complete. The current pre-release (snapshot 24w44a) is not yet documented.

One who wishes to commandeer the merging of this into Protocol when an update is made must be sure to respect any changes that may have occurred to the respective packets there.

Contents

Data types

Name Size (bytes) Encodes Notes
ID Set Varies Set of registry IDs specified either inline or as a reference to a tag. See #ID Set

ID Set

Represents a set of IDs in a certain registry (implied by context), either directly (enumerated IDs) or indirectly (tag name).

Name Type Description
Type VarInt Identifier used to determine the data that follows. It can be either:
  • 0 - Represents a named set of IDs defined by a tag.
  • Anything else - Represents an ad-hoc set of IDs enumerated inline.
Tag Name Optional Identifier The registry tag defining the ID set. Only present if Type is 0.
IDs Optional Array of VarInt An array of registry IDs. Only present if Type is not 0.
The size of the array is equal to Type - 1.

Packets

ID Packet name Documentation
Play clientbound
0x20 Synchronize Entity Position Pre
0x31 Move Minecart Along Track Pre
0x41 Update Recipe Book Current
0x43 Player Rotation Pre
0x44 Recipe Book Add Pre
0x45 Recipe Book Remove Pre
0x46 Recipe Book Settings Pre
0x53 0x63 Set Held Item Current (unchanged)
0x5a Set Cursor Item Pre
0x66 Set Player Inventory Slot Pre
Play serverbound
0x02 Bundle Item Selected Pre
0x0b Client Tick End Pre

Handshake

No changes so far.

Status

No changes so far.

Login

No changes so far.

Configuration

No changes so far.

Play

Clientbound

Synchronize Entity Position

Packet ID State Bound To Field Name Field Type Notes
0x20 Play Client Teleport ID VarInt Client should confirm this packet with Confirm Teleportation containing the same Teleport ID.
X Double
Y Double
Z Double
Velocity X Double
Velocity Y Double
Velocity Z Double
Yaw Float Rotation on the X axis, in degrees.
Pitch Float Rotation on the Y axis, in degrees.
On Ground Boolean

Move Minecart Along Track

Packet ID State Bound To Field Name Field Type Notes
0x31 Play Client Entity ID VarInt
Step Count VarInt Number of elements in the following array.
Steps X Array Double
Y Double
Z Double
Velocity X Double
Velocity Y Double
Velocity Z Double
Yaw Angle
Pitch Angle
Weight Float

Player Rotation

Packet ID State Bound To Field Name Field Type Notes
0x43 Play Client Yaw Float Rotation on the X axis, in degrees.
Pitch Float Rotation on the Y axis, in degrees.

Recipe Book Add

Packet ID State Bound To Field Name Field Type Notes
0x44 Play Client Recipe Count VarInt Number of elements in the following array.
Recipes Recipe ID Array VarInt ID to assign to the recipe.
Display ID VarInt ID in the minecraft:recipe_display registry.
Group ID VarInt
Category ID VarInt ID in the minecraft:recipe_book_category registry.
Has Ingredients Boolean
Ingredient Count Optional VarInt Number of elements in the following array. Only present if Has Ingredients is true.
Ingredients Optional Array of ID Set Only present if Has Ingredients is true.
Flags Byte 0x01: show notification; 0x02: hightlight as new

Recipe Book Remove

Packet ID State Bound To Field Name Field Type Notes
0x45 Play Client Recipe Count VarInt Number of elements in the following array.
Recipes Array of VarInt IDs of recipes to remove.

Recipe Book Settings

Packet ID State Bound To Field Name Field Type Notes
0x46 Play Client Crafting Recipe Book Open Boolean If true, then the crafting recipe book will be open when the player opens its inventory.
Crafting Recipe Book Filter Active Boolean If true, then the filtering option is active when the players opens its inventory.
Smelting Recipe Book Open Boolean If true, then the smelting recipe book will be open when the player opens its inventory.
Smelting Recipe Book Filter Active Boolean If true, then the filtering option is active when the players opens its inventory.
Blast Furnace Recipe Book Open Boolean If true, then the blast furnace recipe book will be open when the player opens its inventory.
Blast Furnace Recipe Book Filter Active Boolean If true, then the filtering option is active when the players opens its inventory.
Smoker Recipe Book Open Boolean If true, then the smoker recipe book will be open when the player opens its inventory.
Smoker Recipe Book Filter Active Boolean If true, then the filtering option is active when the players opens its inventory.

Set Cursor Item

Packet ID State Bound To Field Name Field Type Notes
0x5A Play Client Slot Data Slot

Set Player Inventory Slot

Packet ID State Bound To Field Name Field Type Notes
0x66 Play Client Slot VarInt
Slot Data Slot

Serverbound

Bundle Item Selected

Packet ID State Bound To Field Name Field Type Notes
0x02 Play Server Slot of Bundle VarInt
Slot in Bundle VarInt

Client Tick End

Packet ID State Bound To Field Name Field Type Notes
0x0B Play Server no fields