Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(Updated to 1.21-pre2)
 
(758 intermediate revisions by 48 users not shown)
Line 1: Line 1:
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently [[Protocol version numbers|1.12.2, protocol 340]]) to the current pre-release (currently [[Protocol version numbers|17w46a, protocol 345]]). Note that this page contains bleeding-edge information that may not be completely or correctly documented.
+
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently [[Protocol version numbers|1.20.6, protocol 766]]) to the current pre-release (currently [[Protocol version numbers|1.21-pre2, protocol {{Snapshot PVN|1073742024}}]]). Note that this page contains bleeding-edge information that may not be completely or correctly 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.
 
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.
Line 9: Line 9:
 
=== Data types ===
 
=== Data types ===
  
No changes so far.
+
No changes documented so far.
  
 
=== Packets ===
 
=== Packets ===
Line 18: Line 18:
 
  !colspan="2"| Documentation
 
  !colspan="2"| Documentation
 
  |-
 
  |-
!colspan="4"| Handshaking serverbound
+
!colspan="4"| Configuration clientbound
{{PacketList|0x00|Handshake}}
+
{{PacketList|0x0F|Clientbound Report Details (configuration)|rel=added}}
 +
{{PacketList|0x10|Clientbound Server Links (configuration)|rel=added}}
 
  |-
 
  |-
!colspan="4"| Play clientbound
+
!colspan="4"| Play clientbound
{{PacketList|{{change|0x0F|0x0E}}|Chat Message (clientbound)|pre=unchanged}}
+
{{PacketList|0x7A|Clientbound Report Details (play)|rel=added}}
{{PacketList|{{change|0x10|0x0F}}|Multi Block Change|pre=unchanged}}
+
{{PacketList|0x7B|Clientbound Server Links (play)|rel=added}}
{{PacketList|{{change|0x0E|0x10}}|Tab-Complete (clientbound)}}
 
{{PacketList|0x11|Declare Commands|rel=added}}
 
{{PacketList|{{change|0x11|0x12}}|Confirm Transaction (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x12|0x13}}|Close Window (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x13|0x14}}|Open Window|pre=unchanged}}
 
{{PacketList|{{change|0x14|0x15}}|Window Items|pre=unchanged}}
 
{{PacketList|{{change|0x15|0x16}}|Window Property|pre=unchanged}}
 
{{PacketList|{{change|0x16|0x17}}|Set Slot|pre=unchanged}}
 
{{PacketList|{{change|0x17|0x18}}|Set Cooldown|pre=unchanged}}
 
{{PacketList|{{change|0x18|0x19}}|Plugin Message (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x19|0x1A}}|Named Sound Effect}}
 
{{PacketList|{{change|0x1A|0x1B}}|Disconnect (play)|pre=unchanged}}
 
{{PacketList|{{change|0x1B|0x1C}}|Entity Status|pre=unchanged}}
 
{{PacketList|{{change|0x1C|0x1D}}|Explosion|pre=unchanged}}
 
{{PacketList|{{change|0x1D|0x1E}}|Unload Chunk|pre=unchanged}}
 
{{PacketList|{{change|0x1E|0x1F}}|Change Game State|pre=unchanged}}
 
{{PacketList|{{change|0x1F|0x20}}|Keep Alive (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x20|0x21}}|Chunk Data|pre=unchanged}}
 
{{PacketList|{{change|0x21|0x22}}|Effect|pre=unchanged}}
 
{{PacketList|{{change|0x22|0x23}}|Particle}}
 
{{PacketList|{{change|0x23|0x24}}|Join Game|pre=unchanged}}
 
{{PacketList|{{change|0x24|0x25}}|Map|pre=unchanged}}
 
{{PacketList|{{change|0x25|0x26}}|Entity|pre=unchanged}}
 
{{PacketList|{{change|0x26|0x27}}|Entity Relative Move|pre=unchanged}}
 
{{PacketList|{{change|0x27|0x28}}|Entity Look And Relative Move|pre=unchanged}}
 
{{PacketList|{{change|0x28|0x29}}|Entity Look|pre=unchanged}}
 
{{PacketList|{{change|0x29|0x2A}}|Vehicle Move (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x2A|0x2B}}|Open Sign Editor|pre=unchanged}}
 
{{PacketList|{{change|0x2B|0x2C}}|Craft Recipe Response|pre=unchanged}}
 
{{PacketList|{{change|0x2C|0x2D}}|Player Abilities (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x2D|0x2E}}|Combat Event|pre=unchanged}}
 
{{PacketList|{{change|0x2E|0x2F}}|Player List Item|pre=unchanged}}
 
{{PacketList|{{change|0x2F|0x30}}|Player Position And Look (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x30|0x31}}|Use Bed|pre=unchanged}}
 
{{PacketList|{{change|0x31|0x32}}|Unlock Recipes|pre=unchanged}}
 
{{PacketList|{{change|0x32|0x33}}|Destroy Entities|pre=unchanged}}
 
{{PacketList|{{change|0x33|0x34}}|Remove Entity Effect|pre=unchanged}}
 
{{PacketList|{{change|0x34|0x35}}|Resource Pack Send|pre=unchanged}}
 
{{PacketList|{{change|0x35|0x36}}|Respawn|pre=unchanged}}
 
{{PacketList|{{change|0x36|0x37}}|Entity Head Look|pre=unchanged}}
 
{{PacketList|{{change|0x37|0x38}}|Select Advancement Tab|pre=unchanged}}
 
{{PacketList|{{change|0x38|0x39}}|World Border|pre=unchanged}}
 
{{PacketList|{{change|0x39|0x3A}}|Camera|pre=unchanged}}
 
{{PacketList|{{change|0x3A|0x3B}}|Held Item Change (clientbound)|pre=unchanged}}
 
{{PacketList|{{change|0x3B|0x3C}}|Display Scoreboard|pre=unchanged}}
 
{{PacketList|{{change|0x3C|0x3D}}|Entity Metadata|pre=unchanged}}
 
{{PacketList|{{change|0x3D|0x3E}}|Attach Entity|pre=unchanged}}
 
{{PacketList|{{change|0x3E|0x3F}}|Entity Velocity|pre=unchanged}}
 
{{PacketList|{{change|0x3F|0x40}}|Entity Equipment|pre=unchanged}}
 
{{PacketList|{{change|0x40|0x41}}|Set Experience|pre=unchanged}}
 
{{PacketList|{{change|0x41|0x42}}|Update Health|pre=unchanged}}
 
{{PacketList|{{change|0x42|0x43}}|Scoreboard Objective|pre=unchanged}}
 
{{PacketList|{{change|0x43|0x44}}|Set Passengers|pre=unchanged}}
 
{{PacketList|{{change|0x44|0x45}}|Teams|pre=unchanged}}
 
{{PacketList|{{change|0x45|0x46}}|Update Score|pre=unchanged}}
 
{{PacketList|{{change|0x46|0x47}}|Spawn Position|pre=unchanged}}
 
{{PacketList|{{change|0x47|0x48}}|Time Update|pre=unchanged}}
 
{{PacketList|{{change|0x48|0x49}}|Title|pre=unchanged}}
 
{{PacketList|0x4A|Stop Sound|rel=added}}
 
{{PacketList|{{change|0x49|0x4B}}|Sound Effect|pre=unchanged}}
 
{{PacketList|{{change|0x4A|0x4C}}|Player List Header And Footer|pre=unchanged}}
 
{{PacketList|{{change|0x4B|0x4D}}|Collect Item|pre=unchanged}}
 
{{PacketList|{{change|0x4C|0x4E}}|Entity Teleport|pre=unchanged}}
 
{{PacketList|{{change|0x4D|0x4F}}|Advancements|pre=unchanged}}
 
{{PacketList|{{change|0x4E|0x50}}|Entity Properties|pre=unchanged}}
 
{{PacketList|{{change|0x4F|0x51}}|Entity Effect|pre=unchanged}}
 
 
  |-
 
  |-
!colspan="4"| Play serverbound
+
|}
{{PacketList|{{change|0x02|0x01}}|Chat Message (serverbound)|pre=unchanged}}
 
{{PacketList|{{change|0x03|0x02}}|Client Status|pre=unchanged}}
 
{{PacketList|{{change|0x04|0x03}}|Client Settings|pre=unchanged}}
 
{{PacketList|{{change|0x01|0x04}}|Tab-Complete (serverbound)}}
 
|}
 
  
== New/modified data types ==
+
== Handshake ==
  
 
No changes so far.
 
No changes so far.
  
== Block Actions ==
+
== Status ==
  
No changes so far.  
+
No changes so far.
  
== Plugin Channels ==
+
== Login ==
  
=== <code>MC|StopSound</code> ===
+
No changes so far.
 
 
{{Change|''Server to client''}}
 
  
{{Change|Used to implement {{Minecraft Wiki|Commands#StopSound|the <code>/stopsound</code> command}}.  Stops a sound that is currently playing on the client.}}
+
== Configuration ==
 
 
{| class="wikitable" style="background-color: #f4cccc; text-decoration: line-through;"
 
! Field name
 
! Field type
 
! Notes
 
|-
 
| Sound category
 
| String
 
| Should be one of the sound categories used in [[Protocol#Named Sound Effect|Named Sound Effect]], but if it's invalid or empty then it is (intentionally) treated as ''all'' sound categories.
 
|-
 
| Sound name
 
| String
 
| A [http://pokechu22.github.io/Burger/1.11.html#sounds sound effect name].  If left empty, ''all'' sounds are stopped.
 
|}
 
 
 
{{Change|Emptiness of sound category or sound name can be combined, IE a empty sound name but a set sound category will stop all sounds in the given category.}}
 
 
 
{{Change||This plugin channel has been replaced by the [[#Stop sound|stop sound]] packet.}}
 
 
 
== Play ==
 
  
 
=== Clientbound ===
 
=== Clientbound ===
  
==== Tab-Complete (clientbound) ====
+
==== Clientbound Report Details (configuration) ====
  
{{Need Info|This is most definitely no longer an accurate description of this packet}}
+
Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.
  
The server responds with a list of auto-completions of the last word sent to it. In the case of regular chat, this is a player username. Command names and parameters are also supported. The client sorts these alphabetically before listing them.
+
{| class="wikitable" {{added}}
 
 
{| class="wikitable"
 
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  ! Field Name
+
  ! colspan="2"| Field Name
  ! Field Type
+
  ! colspan="2"| Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="3"| {{Change|0x0E|0x10}}
+
  | rowspan="3"| 0x0F
  |rowspan="3"| Play
+
  | rowspan="3"| Configuration
  |rowspan="3"| Client
+
  | rowspan="3"| Client
  |style="background-color: #d9ead3;"| Transaction Id
+
  | colspan="2"| Details Count
  |style="background-color: #d9ead3;"| VarInt
+
  | colspan="2"| {{Type|VarInt}} (32)
  |style="background-color: #d9ead3;"| This id should also be used in the tab completion response packet, or it will be ignored.
+
  | The number of details in the following array.
 
  |-
 
  |-
  | Count
+
  | rowspan="2"| Details
  | VarInt
+
| Title
  | Number of elements in the following array
+
| rowspan="2"| {{Type|Array}}
 +
  | {{Type|String}} (128)
 +
  |
 
  |-
 
  |-
  | Matches
+
  | Description
  | Array of String (32767)
+
  | {{Type|String}} (4096)
  | One eligible command, note that each command is sent separately instead of in a single string, hence the need for Count
+
  |
|}
+
|}
  
==== Declare Commands ====
+
==== Clientbound Server Links (configuration) ====
  
{{Need Info|This information is probably incomplete/inaccurate}}
+
This packet contains a list of links that the Notchian client will display in the menu available from the pause menu. Link labels can be built-in or custom (i.e., any text).
  
Lists all of the commands on the server, and how they are parsed.
+
{| class="wikitable" {{added}}
 
 
{| class="wikitable"
 
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  ! Field Name
+
  ! colspan="2"| Field Name
  ! Field Type
+
  ! colspan="2"| Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="3"| 0x11
+
  | rowspan="4"| 0x10
  |rowspan="3"| Play
+
  | rowspan="4"| Configuration
  |rowspan="3"| Client
+
  | rowspan="4"| Client
  | Count
+
  | colspan="2"| Links Count
  | VarInt
+
  | colspan="2"| {{Type|VarInt}}
  | Length of the following array
+
  | The number of links in the following array.
 
  |-
 
  |-
  | Array
+
  | rowspan="3"| Links
  | Data
+
| Is built-in
  | Very scary
+
| rowspan="3"| {{Type|Array}}
 +
  | {{Type|Boolean}}
 +
  | Determines if the following label is built-in (from enum) or custom (text component).
 
  |-
 
  |-
  | Root index
+
  | Label
  | VarInt
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
  | Index into the previous array of the <code>RootCommandNode</code>
+
  | See below.
  |}
+
|-
 +
| URL
 +
| {{Type|String}}
 +
  | Valid URL.
 +
|}
  
Data:
 
  
{| class="wikitable"
+
{| class="wikitable" {{added}}
  ! Field Name
+
  ! ID
  ! Field Type
+
  ! Name
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | Flags
+
  | 0
  | Byte
+
  | Bug Report
  |
+
| Displayed on connection error screen; included as a comment in the disconnection report.
 +
|-
 +
| 1
 +
| Community Guidelines
 +
  |  
 
  |-
 
  |-
  | Length
+
  | 2
  | VarInt
+
  | Support
  | Length of the following array
+
  |  
 
  |-
 
  |-
  |
+
  | 3
  | Array of VarInt
+
  | Status
  |
+
  |  
 
  |-
 
  |-
  | Redirect index
+
  | 4
  | VarInt
+
  | Feedback
  | Only if flags & 0x08.  Pointed redirect?
+
  |  
 
  |-
 
  |-
  |
+
  | 5
  | LiteralArgumentBuilder or RequiredArgumentBuilder or None
+
  | Community
  | Type depends on flags: LiteralArgumentBuilder if (flags & 0x03) is 1, RequiredArgumentBuilder if (flags & 0x03) is 2, else nothing.
+
  |  
|}
 
 
 
LiteralArgumentBuilder:
 
 
 
{| class="wikitable"
 
! Field Name
 
! Field Type
 
! Notes
 
 
  |-
 
  |-
  | Literal
+
  | 6
  | String (32767)
+
  | Website
  | The text
+
  |  
|}
 
 
 
RequiredArgumentBuilder:
 
 
 
{| class="wikitable"
 
! Field Name
 
! Field Type
 
! Notes
 
 
  |-
 
  |-
  | Name
+
  | 7
  | String (32767)
+
  | Forums
  | The name of the argument
+
  |  
 
  |-
 
  |-
  | Parser
+
  | 8
  | Identifier
+
  | News
  | One of several known to the client, listed below.  If the client does not know the parser, reading this RequiredArgumentBuilder stops immediately (following fields are not read)
+
  |  
 
  |-
 
  |-
  | Properties
+
  | 9
  | Optional, varies
+
  | Announcements
  | See below.  Varies depending on the parser.
+
  |  
 
  |-
 
  |-
| Suggests
 
| Optional Identifier
 
| Only present if (flags & 0x10) != 0
 
 
  |}
 
  |}
  
Parsers:
+
=== Serverbound ===
 +
 
 +
No changes so far.
 +
 
 +
== Play ==
  
{| class="wikitable"
+
=== Clientbound ===
! Name
 
! Description
 
! Properties
 
|-
 
| <code>brigadier:bool</code>
 
| Boolean value (<code>true</code> or <code>false</code>, case-sensitive)
 
| None
 
|-
 
| <code>brigadier:float</code>
 
| Float
 
| Specifies min and max values:
 
  {| class="wikitable"
 
  ! Name
 
  ! Type
 
  ! Description
 
  |-
 
  | Flags
 
  | Byte
 
  |
 
  |-
 
  | Min
 
  | Optional float
 
  | Only if flags & 0x01.  If not specified, defaults to <code>-Float.MAX_VALUE</code> (≈ -3.4028235E38)
 
  |-
 
  | Max
 
  | Optional float
 
  | Only if flags & 0x02.  If not specified, defaults to <code>Float.MAX_VALUE</code> (≈ 3.4028235E38)
 
  |}
 
|-
 
| <code>brigadier:integer</code>
 
| Integer
 
| Specifies min and max values:
 
  {| class="wikitable"
 
  ! Name
 
  ! Type
 
  ! Description
 
  |-
 
  | Flags
 
  | Byte
 
  |
 
  |-
 
  | Min
 
  | Optional float
 
  | Only if flags & 0x01.  If not specified, defaults to <code>Integer.MIN_VALUE</code> (-2147483648)
 
  |-
 
  | Max
 
  | Optional float
 
  | Only if flags & 0x02.  If not specified, defaults to <code>Integer.MAX_VALUE</code> (2147483647)
 
  |}
 
|-
 
| <code>brigadier:string</code>
 
| A string
 
| A VarInt enum:
 
  {| class="wikitable"
 
  ! Value
 
  ! Name
 
  ! Description
 
  |-
 
  | 0
 
  | <code>SINGLE_WORD</code>
 
  | Reads a single word
 
  |-
 
  | 1
 
  | <code>QUOTABLE_PHRASE</code>
 
  | If it starts with a <code>"</code>, keeps reading until another <code>"</code> (allowing escaping with <code>\</code>).  Otherwise behaves the same as <code>SINGLE_WORD</code>
 
  |-
 
  | 2
 
  | <code>GREEDY_PHRASE</code>
 
  | Reads the rest of the content after the cursor.  Quotes will not be removed.
 
  |}
 
|-
 
| <code>minecraft:entity</code>
 
| A selector, player name, or UUID.
 
| Has a single flags byte:
 
  {| class="wikitable"
 
  ! Bit mask
 
  ! Meaning
 
  |-
 
  | 0x01
 
  | Only allows 1 entity/player
 
  |-
 
  | 0x02
 
  | Only allows players
 
  |}
 
|-
 
| <code>minecraft:game_profile</code>
 
| A player, online or not.  Can also use a selector, which may match one or more players (but not entities).
 
| None
 
|-
 
| <code>minecraft:block_pos</code>
 
| A location, represented as 3 numbers (which must be integers).  May use relative locations with <code>~</code>.
 
| None
 
|-
 
| <code>minecraft:vec3</code>
 
| A location, represented as 3 numbers (which may have a decimal point, but will be moved to the center of a block if none is specified).  May use relative locations with <code>~</code>.
 
| None
 
|-
 
| <code>minecraft:vec2</code>
 
| A location, represented as 2 numbers (which may have a decimal point, but will be moved to the center of a block if none is specified).  May use relative locations with <code>~</code>.
 
| None
 
|-
 
| <code>minecraft:block</code>
 
| A block state, optionally including NBT and state information.
 
| None
 
|-
 
| <code>minecraft:item</code>
 
| An item, optionally including NBT.
 
| None
 
|-
 
| <code>minecraft:color</code>
 
| A chat color.  One of the names from [[Chat#Colors]], or <code>reset</code>.  Case-insensitive.
 
| None
 
|-
 
| <code>minecraft:component</code>
 
| A JSON [[Chat]] component.
 
| None
 
|-
 
| <code>minecraft:message</code>
 
| A regular message, potentially including selectors.
 
| None
 
|-
 
| <code>minecraft:nbt</code>
 
| An NBT value, parsed using JSON-NBT rules.
 
| None
 
|-
 
| <code>minecraft:nbt_path</code>
 
| A path within an NBT value, allowing for array and member accesses.
 
| None
 
|-
 
| <code>minecraft:objective</code>
 
| A scoreboard objective.
 
| None
 
|-
 
| <code>minecraft:objective_criteria</code>
 
| A single score criterion.
 
| None
 
|-
 
| <code>minecraft:operation</code>
 
| A scoreboard operator
 
| None
 
|-
 
| <code>minecraft:particle</code>
 
| A particle effect (an identifier with extra information following it for specific particles, mirroring the [[#Particle|Particle]] packet)
 
| None
 
|-
 
| <code>minecraft:rotation</code>
 
| An angle, represented as 2 numbers (which may have a decimal point, but will be moved to the center of a block if none is specified).  May use relative locations with <code>~</code>.
 
| None
 
|-
 
| <code>minecraft:scoreboard_slot</code>
 
| A scoreboard display position slot.  <code>list</code>, <code>sidebar</code>, <code>belowName</code>, and <code>sidebar.team.${color}</code> for all chat colors (<code>reset</code> is not included)
 
| None
 
|-
 
| <code>minecraft:score_holder</code>
 
| Something that can join a team.  Allows selectors and <code>*</code>.
 
| Has a single flags byte:
 
  {| class="wikitable"
 
  ! Bit mask
 
  ! Meaning
 
  |-
 
  | 0x01
 
  | Unknown.
 
  |-
 
  | 0x02
 
  | Unknown.
 
  |}
 
|-
 
| <code>minecraft:swizzle</code>
 
| A collection of up to 3 axes.
 
| None
 
|-
 
| <code>minecraft:team</code>
 
| The name of a team.  Parsed as an unquoted string.
 
| None
 
|-
 
| <code>minecraft:item_slot</code>
 
| A name for an inventory slot.
 
| None
 
|-
 
| <code>minecraft:resource_location</code>
 
| An Identifier.
 
| None
 
|-
 
| <code>minecraft:mob_effect</code>
 
| A potion effect.
 
| None
 
|}
 
  
==== Named Sound Effect ====
+
==== Clientbound Report Details (play) ====
{{See also|#Sound Effect}}
 
  
Used to play a sound effect on the client. Custom sounds may be added by resource packs.
+
Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.
  
{| class="wikitable"
+
{| class="wikitable" {{added}}
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  ! Field Name
+
  ! colspan="2"| Field Name
  ! Field Type
+
  ! colspan="2"| Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="7"| {{Change|0x19|0x1A}}
+
  | rowspan="3"| 0x7A
  |rowspan="7"| Play
+
  | rowspan="3"| Configuration
  |rowspan="7"| Client
+
  | rowspan="3"| Client
  | Sound Name
+
  | colspan="2"| Details Count
  | {{Change|String (256)|Identifier}}
+
  | colspan="2"| {{Type|VarInt}} (32)
  | All sound effect names as of 1.12.2 can be seen [http://pokechu22.github.io/Burger/1.12.2.html#sounds here].
+
  | The number of details in the following array.
 
  |-
 
  |-
  | Sound Category
+
  | rowspan="2"| Details
  | VarInt Enum
+
  | Title
  | The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories])
+
| rowspan="2"| {{Type|Array}}
 +
  | {{Type|String}} (128)
 +
|
 
  |-
 
  |-
  | Effect Position X
+
  | Description
  | Int
+
  | {{Type|String}} (4096)
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)
+
  |
|-
+
|}
| Effect Position Y
 
| Int
 
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)
 
  |-
 
| Effect Position Z
 
| Int
 
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part)
 
|-
 
| Volume
 
| Float
 
| 1 is 100%, can be more
 
|-
 
| Pitch
 
| Float
 
| Float between 0.5 and 2.0 by Notchian clients
 
|}
 
  
==== Particle ====
+
==== Clientbound Server Links (play) ====
  
Displays the named particle
+
This packet contains a list of links that the Notchian client will display in the menu available from the pause menu. Link labels can be built-in or custom (i.e., any text).
  
{| class="wikitable"
+
{| class="wikitable" {{added}}
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  ! Field Name
+
  ! colspan="2"| Field Name
  ! Field Type
+
  ! colspan="2"| Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="11"| {{Change|0x22|0x23}}
+
  | rowspan="4"| 0x7B
  |rowspan="11"| Play
+
  | rowspan="4"| Configuration
  |rowspan="11"| Client
+
  | rowspan="4"| Client
  | Particle ID
+
  | colspan="2"| Links Count
| Int
+
  | colspan="2"| {{Type|VarInt}}
  | See below
+
  | The number of links in the following array.
|-
 
| Long Distance
 
| Boolean
 
| If true, particle distance increases from 256 to 65536
 
|-
 
| X
 
| Float
 
| X position of the particle
 
|-
 
| Y
 
| Float
 
  | Y position of the particle
 
|-
 
| Z
 
| Float
 
| Z position of the particle
 
|-
 
| Offset X
 
| Float
 
| This is added to the X position after being multiplied by random.nextGaussian()
 
|-
 
| Offset Y
 
| Float
 
| This is added to the Y position after being multiplied by random.nextGaussian()
 
 
  |-
 
  |-
  | Offset Z
+
  | rowspan="3"| Links
  | Float
+
| Is built-in
  | This is added to the Z position after being multiplied by random.nextGaussian()
+
| rowspan="3"| {{Type|Array}}
 +
  | {{Type|Boolean}}
 +
  | Determines if the following label is built-in (from enum) or custom (text component).
 
  |-
 
  |-
  | Particle Data
+
  | Label
  | Float
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
  | The data of each particle
+
  | See below.
 
  |-
 
  |-
  | Particle Count
+
  | URL
| Int
+
  | {{Type|String}}
| The number of particles to create
+
  | Valid URL.
|-
+
|}
| Data
 
  | {{Change|Array of VarInt|Varies}}
 
  | {{Change|Length depends on particle. "iconcrack" has length of 2, "blockcrack", "blockdust", and "fallingdust" have lengths of 1, the rest have 0.|Type of data varies based off of the particle.  For "iconcrack", it is a [[Slot]].  For "blockcrack", "blockdust", and "fallingdust", it is a block state encoded as a VarInt that is an index within the global palette.}}
 
|}
 
  
==== Stop Sound ====
+
{| class="wikitable" {{added}}
 
+
  ! ID
{| class="wikitable"
+
  ! Name
  ! Packet ID
 
  ! State
 
! Bound To
 
! Field Name
 
! Field Type
 
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="7"| 0x4A
+
  | 0
|rowspan="7"| Play
+
  | Bug Report
|rowspan="7"| Client
+
  | Displayed on connection error screen; included as a comment in the disconnection report.
| Flags
 
  | Byte
 
  | Controls which fields are present.
 
 
  |-
 
  |-
  | Source
+
  | 1
  | Optional VarInt enum
+
  | Community Guidelines
  | Only if flags is 3 or 1 (bit mask 0x1).  See below.  If not present, then sounds from all sources are cleared.
+
  |  
 
  |-
 
  |-
  | Sound
+
  | 2
| Optional Identifier
+
  | Support
  | Only if flags is 2 or 3 (bit mask 0x2).  A sound effect name, see [[#Named Sound Effect|Named Sound Effect]].  If not present, then all sounds are cleared.
+
  |  
  |}
 
 
 
Categories:
 
 
 
{| class="wikitable"
 
! Name !! Value
 
 
  |-
 
  |-
  | master || 0
+
  | 3
 +
| Status
 +
|  
 
  |-
 
  |-
  | music || 1
+
  | 4
 +
| Feedback
 +
|  
 
  |-
 
  |-
  | record || 2
+
  | 5
 +
| Community
 +
|  
 
  |-
 
  |-
  | weather || 3
+
  | 6
 +
| Website
 +
|  
 
  |-
 
  |-
  | block || 4
+
  | 7
 +
| Forums
 +
|  
 
  |-
 
  |-
  | hostile || 5
+
  | 8
|-
+
  | News
| neutral || 6
+
  |  
|-
 
| player || 7
 
|-
 
| ambient || 8
 
  |-
 
  | voice || 9
 
|}
 
 
 
=== Serverbound ===
 
 
 
==== Tab-Complete (serverbound) ====
 
 
 
{{Need Info|This is most definitely no longer an accurate description of this packet}}
 
 
 
Sent when the user presses ''tab'' while writing text.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
 
  |-
 
  |-
  |rowspan="5"| {{Change|0x01|0x04}}
+
  | 9
|rowspan="5"| Play
+
  | Announcements
|rowspan="5"| Server
 
|style="background-color: #d9ead3;"| Unknown
 
|style="background-color: #d9ead3;"| VarInt
 
|style="background-color: #d9ead3;"|
 
|-
 
| Text
 
| String (32767)
 
| All text behind the cursor (e.g. to the left of the cursor in left-to-right languages like English)
 
|- style="background-color: #f4cccc; text-decoration: line-through;"
 
| Assume Command
 
| Boolean
 
| If true, the server will parse Text as a command even if it doesn't start with a <code>/</code>. Used in the command block GUI.
 
|- style="background-color: #f4cccc; text-decoration: line-through;"
 
| Has Position
 
  | Boolean
 
 
  |  
 
  |  
|- style="background-color: #f4cccc; text-decoration: line-through;"
 
| Looked At Block
 
| Optional Position
 
| The position of the block being looked at. Only sent if Has Position is true.
 
|}
 
 
 
== Handshaking ==
 
 
=== Clientbound ===
 
 
There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the client sends the first packet.
 
 
=== Serverbound ===
 
 
==== Handshake ====
 
 
This causes the server to switch into the target state.
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="4"| 0x00
 
|rowspan="4"| Handshaking
 
|rowspan="4"| Server
 
| Protocol Version
 
| VarInt
 
| See [[protocol version numbers]] (currently {{change|340|345}})
 
 
  |-
 
  |-
| Server Address
 
| String
 
| Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect.  The Notchian server does not use this information.
 
|-
 
| Server Port
 
| Unsigned Short
 
| Default is 25565.  The Notchian server does not use this information.
 
|-
 
| Next State
 
| VarInt Enum
 
| 1 for [[#Status|status]], 2 for [[#Login|login]]
 
 
  |}
 
  |}
 
== Status ==
 
 
=== Clientbound ===
 
 
No changes so far.
 
  
 
=== Serverbound ===
 
=== Serverbound ===
  
 
No changes so far.
 
No changes so far.
 
== Login ==
 
 
=== Clientbound ===
 
 
No changes so far.
 
 
=== Serverbound ===
 
 
No changes so far.
 
 
  
 
[[Category:Minecraft Modern]]
 
[[Category:Minecraft Modern]]

Latest revision as of 10:40, 8 June 2024

This page documents the changes from the last stable Minecraft release (currently 1.20.6, protocol 766) to the current pre-release (currently 1.21-pre2, protocol Snapshot 200). Note that this page contains bleeding-edge information that may not be completely or correctly 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

No changes documented so far.

Packets

ID Packet name Documentation
Configuration clientbound
0x0F Clientbound Report Details (configuration) Pre
0x10 Clientbound Server Links (configuration) Pre
Play clientbound
0x7A Clientbound Report Details (play) Pre
0x7B Clientbound Server Links (play) Pre

Handshake

No changes so far.

Status

No changes so far.

Login

No changes so far.

Configuration

Clientbound

Clientbound Report Details (configuration)

Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.

Packet ID State Bound To Field Name Field Type Notes
0x0F Configuration Client Details Count VarInt (32) The number of details in the following array.
Details Title Array String (128)
Description String (4096)

Clientbound Server Links (configuration)

This packet contains a list of links that the Notchian client will display in the menu available from the pause menu. Link labels can be built-in or custom (i.e., any text).

Packet ID State Bound To Field Name Field Type Notes
0x10 Configuration Client Links Count VarInt The number of links in the following array.
Links Is built-in Array Boolean Determines if the following label is built-in (from enum) or custom (text component).
Label VarInt Enum / Text Component See below.
URL String Valid URL.


ID Name Notes
0 Bug Report Displayed on connection error screen; included as a comment in the disconnection report.
1 Community Guidelines
2 Support
3 Status
4 Feedback
5 Community
6 Website
7 Forums
8 News
9 Announcements

Serverbound

No changes so far.

Play

Clientbound

Clientbound Report Details (play)

Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.

Packet ID State Bound To Field Name Field Type Notes
0x7A Configuration Client Details Count VarInt (32) The number of details in the following array.
Details Title Array String (128)
Description String (4096)

Clientbound Server Links (play)

This packet contains a list of links that the Notchian client will display in the menu available from the pause menu. Link labels can be built-in or custom (i.e., any text).

Packet ID State Bound To Field Name Field Type Notes
0x7B Configuration Client Links Count VarInt The number of links in the following array.
Links Is built-in Array Boolean Determines if the following label is built-in (from enum) or custom (text component).
Label VarInt Enum / Text Component See below.
URL String Valid URL.
ID Name Notes
0 Bug Report Displayed on connection error screen; included as a comment in the disconnection report.
1 Community Guidelines
2 Support
3 Status
4 Feedback
5 Community
6 Website
7 Forums
8 News
9 Announcements

Serverbound

No changes so far.