Pre-release protocol

From wiki.vg
Revision as of 04:18, 1 November 2024 by imported>LassiPulkkinen (Typo.)
Jump to navigation Jump to search

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
{{#switch: Pre-release protocol Data types =
       ID Set
#default =
       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 {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       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 {{#switch: Pre-release protocol Data types =
       Optional
#default =
       Optional
   }} {{#switch: Pre-release protocol
Data types =
       Identifier
#default =
       Identifier
   }}
The registry tag defining the ID set. Only present if Type is 0.
IDs {{#switch: Pre-release protocol Data types =
       Optional
#default =
       Optional
   }} {{#switch: Pre-release protocol
Data types =
       Array
#default =
       Array
   }} of {{#switch: Pre-release protocol
Data types =
       VarInt
#default =
       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 added Current }} removed unchanged | (unchanged) | Pre }} }}
0x31 Move Minecart Along Track added Current }} removed unchanged | (unchanged) | Pre }} }}
0x41 Update Recipe Book added Current }} removed unchanged | (unchanged) | Pre }} }}
0x43 Player Rotation added Current }} removed unchanged | (unchanged) | Pre }} }}
0x44 Recipe Book Add added Current }} removed unchanged | (unchanged) | Pre }} }}
0x45 Recipe Book Remove added Current }} removed unchanged | (unchanged) | Pre }} }}
0x46 Recipe Book Settings added Current }} removed unchanged | (unchanged) | Pre }} }}
0x53}}{{#if:0x63|{{#if:0x53| }}0x63}} Set Held Item added Current }} removed unchanged | (unchanged) | Pre }} }}
0x5a Set Cursor Item added Current }} removed unchanged | (unchanged) | Pre }} }}
0x66 Set Player Inventory Slot added Current }} removed unchanged | (unchanged) | Pre }} }}
Play serverbound
0x02 Bundle Item Selected added Current }} removed unchanged | (unchanged) | Pre }} }}
0x0b Client Tick End added Current }} removed unchanged | (unchanged) | 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 {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Client should confirm this packet with Confirm Teleportation containing the same Teleport ID.
X {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Y {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Z {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity X {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity Y {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity Z {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Yaw {{#switch: Pre-release protocol Data types =
       Float
#default =
       Float
   }}
Rotation on the X axis, in degrees.
Pitch {{#switch: Pre-release protocol Data types =
       Float
#default =
       Float
   }}
Rotation on the Y axis, in degrees.
On Ground {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}

Move Minecart Along Track

Packet ID State Bound To Field Name Field Type Notes
0x31 Play Client Entity ID {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Step Count {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Number of elements in the following array.
Steps X {{#switch: Pre-release protocol Data types =
       Array
#default =
       Array
   }}
{{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Y {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Z {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity X {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity Y {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Velocity Z {{#switch: Pre-release protocol Data types =
       Double
#default =
       Double
   }}
Yaw {{#switch: Pre-release protocol Data types =
       Angle
#default =
       Angle
   }}
Pitch {{#switch: Pre-release protocol Data types =
       Angle
#default =
       Angle
   }}
Weight {{#switch: Pre-release protocol Data types =
       Float
#default =
       Float
   }}

Player Rotation

Packet ID State Bound To Field Name Field Type Notes
0x43 Play Client Yaw {{#switch: Pre-release protocol Data types =
       Float
#default =
       Float
   }}
Rotation on the X axis, in degrees.
Pitch {{#switch: Pre-release protocol Data types =
       Float
#default =
       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 {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Number of elements in the following array.
Recipes Recipe ID {{#switch: Pre-release protocol Data types =
       Array
#default =
       Array
   }}
{{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
ID to assign to the recipe.
Display ID {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
ID in the minecraft:recipe_display registry.
Group ID {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Category ID {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
ID in the minecraft:recipe_book_category registry.
Has Ingredients {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
Ingredient Count {{#switch: Pre-release protocol Data types =
       Optional
#default =
       Optional
   }} {{#switch: Pre-release protocol
Data types =
       VarInt
#default =
       VarInt
   }}
Number of elements in the following array. Only present if Has Ingredients is true.
Ingredients {{#switch: Pre-release protocol Data types =
       Optional
#default =
       Optional
   }} {{#switch: Pre-release protocol
Data types =
       Array
#default =
       Array
   }} of {{#switch: Pre-release protocol
Data types =
       ID Set
#default =
       ID Set
   }}
Only present if Has Ingredients is true.
Flags {{#switch: Pre-release protocol Data types =
       Byte
#default =
       Byte
   }}
0x01: show notification; 0x02: highlight as new

Recipe Book Remove

Packet ID State Bound To Field Name Field Type Notes
0x45 Play Client Recipe Count {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Number of elements in the following array.
Recipes {{#switch: Pre-release protocol Data types =
       Array
#default =
       Array
   }} of {{#switch: Pre-release protocol
Data types =
       VarInt
#default =
       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 {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the crafting recipe book will be open when the player opens its inventory.
Crafting Recipe Book Filter Active {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the filtering option is active when the players opens its inventory.
Smelting Recipe Book Open {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the smelting recipe book will be open when the player opens its inventory.
Smelting Recipe Book Filter Active {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the filtering option is active when the players opens its inventory.
Blast Furnace Recipe Book Open {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the blast furnace recipe book will be open when the player opens its inventory.
Blast Furnace Recipe Book Filter Active {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the filtering option is active when the players opens its inventory.
Smoker Recipe Book Open {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       Boolean
   }}
If true, then the smoker recipe book will be open when the player opens its inventory.
Smoker Recipe Book Filter Active {{#switch: Pre-release protocol Data types =
       Boolean
#default =
       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 {{#switch: Pre-release protocol Data types =
       Slot
#default =
       Slot
   }}

Set Player Inventory Slot

Packet ID State Bound To Field Name Field Type Notes
0x66 Play Client Slot {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Slot Data {{#switch: Pre-release protocol Data types =
       Slot
#default =
       Slot
   }}

Serverbound

Bundle Item Selected

Packet ID State Bound To Field Name Field Type Notes
0x02 Play Server Slot of Bundle {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}
Slot in Bundle {{#switch: Pre-release protocol Data types =
       VarInt
#default =
       VarInt
   }}

Client Tick End

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