Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(20w13b)
(Updated to 1.21-pre2)
 
(282 intermediate revisions by 34 users not shown)
Line 1: Line 1:
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently [[Protocol version numbers|1.15.2, protocol 578]]) to the current pre-release (currently [[Protocol version numbers|20w13b, protocol 709]]). 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|0x4E|0x43}}|Spawn Position|pre=unchanged}}
+
{{PacketList|0x7A|Clientbound Report Details (play)|rel=added}}
{{PacketList|{{Change|0x43|0x44}}|Display Scoreboard|pre=unchanged}}
+
{{PacketList|0x7B|Clientbound Server Links (play)|rel=added}}
{{PacketList|{{Change|0x44|0x45}}|Entity Metadata|pre=unchanged}}
 
{{PacketList|{{Change|0x45|0x46}}|Attach Entity|pre=unchanged}}
 
{{PacketList|{{Change|0x46|0x47}}|Entity Velocity|pre=unchanged}}
 
{{PacketList|{{Change|0x47|0x48}}|Entity Equipment|pre=unchanged}}
 
{{PacketList|{{Change|0x48|0x49}}|Set Experience|pre=unchanged}}
 
{{PacketList|{{Change|0x49|0x4A}}|Update Health|pre=unchanged}}
 
{{PacketList|{{Change|0x4A|0x4B}}|Scoreboard Objective|pre=unchanged}}
 
{{PacketList|{{Change|0x4B|0x4C}}|Set Passengers|pre=unchanged}}
 
{{PacketList|{{Change|0x4C|0x4D}}|Teams|pre=unchanged}}
 
{{PacketList|{{Change|0x4D|0x4E}}|Update Score|pre=unchanged}}
 
 
  |-
 
  |-
!colspan="4"| Play serverbound
+
|}
{{PacketList|0x27|Update Jigsaw Block}}
 
|-
 
!colspan="4"| Login clientbound
 
{{PacketList|0x02|Login Success}}
 
|}
 
  
== New/modified data types ==
+
== Handshake ==
  
 
No changes so far.
 
No changes so far.
  
== Entity Metadata ==
+
== Status ==
  
{{#vardefine:meta_prerelease|1}}
+
No changes so far.
  
=== FishingHook ===
+
== Login ==
  
{{Metadata inherit|FishingHook|inherits=Entity|start_at=7}}
+
No changes so far.
  
{| class="wikitable"
+
== Configuration ==
! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
|-
 
| {{Metadata id|}}
 
| VarInt
 
|colspan="2"| Hooked entity id + 1, or 0 if there is no hooked entity
 
| 0
 
|- {{Added}}
 
| {{Metadata id|added}}
 
| Boolean
 
|colspan="2"| Is catchable
 
| False
 
|}
 
  
=== Abstract Arrow ===
+
=== Clientbound ===
  
{{Metadata inherit|Abstract Arrow|inherits=Entity|start_at=7}}
+
==== Clientbound Report Details (configuration) ====
  
Abstract base class for [[#Tipped Arrow|Tipped Arrow]] (which is used for regular arrows as well as tipped ones) and [[#Spectral Arrow|Spectral Arrow]].
+
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}}
  ! Index
+
  ! Packet ID
  ! Type
+
  ! State
  !style="width: 250px;" colspan="2"| Meaning
+
! Bound To
  ! Default
+
  ! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
  ! Notes
 
  |-
 
  |-
  | rowspan="3" | {{Metadata id|}}
+
  | rowspan="3"| 0x0F
  | rowspan="3" | Byte
+
  | rowspan="3"| Configuration
  ! Bit mask
+
  | rowspan="3"| Client
  ! Meaning
+
  | colspan="2"| Details Count
  | rowspan="3" | 0
+
  | colspan="2"| {{Type|VarInt}} (32)
 +
| The number of details in the following array.
 
  |-
 
  |-
  | 0x01
+
  | rowspan="2"| Details
  | Is critical
+
| Title
 +
| rowspan="2"| {{Type|Array}}
 +
| {{Type|String}} (128)
 +
  |
 
  |-
 
  |-
  | 0x02
+
  | Description
| Is noclip (used by loyalty tridents when returning)
+
  | {{Type|String}} (4096)
|- {{removed}}
+
  |
  | {{Metadata id|removed}}
+
|}
  | OptUUID
 
|colspan="2"| Unused
 
| Empty
 
|-
 
| {{Metadata id|}}
 
| Byte
 
|colspan="2"| Peircing level
 
| 0
 
|}
 
  
=== Tipped Arrow ===
+
==== Clientbound Server Links (configuration) ====
  
{{Metadata inherit|Tipped Arrow|inherits=Abstract Arrow}}
+
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).
  
Used for both tipped and regular arrows.  If not tipped, then color is set to -1 and no tipped arrow particles are used.
+
{| class="wikitable" {{added}}
 
+
! Packet ID
{| class="wikitable"
+
  ! State
  ! Index
+
  ! Bound To
  ! Type
+
! colspan="2"| Field Name
  !style="width: 250px;" colspan="2"| Meaning
+
! colspan="2"| Field Type
  ! Default
+
  ! Notes
 +
|-
 +
| rowspan="4"| 0x10
 +
| rowspan="4"| Configuration
 +
| rowspan="4"| Client
 +
| colspan="2"| Links Count
 +
  | colspan="2"| {{Type|VarInt}}
 +
| The number of links in the following array.
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | rowspan="3"| Links
| VarInt
+
  | Is built-in
|colspan="2"| Color (-1 for no particles)
+
  | rowspan="3"| {{Type|Array}}
  | -1
+
| {{Type|Boolean}}
  |}
+
  | Determines if the following label is built-in (from enum) or custom (text component).
 
 
=== Spectral Arrow ===
 
 
 
{{Metadata inherit|Spectral Arrow|inherits=Abstract Arrow}}
 
 
 
No additional metadata.
 
 
 
=== Trident ===
 
 
 
{{Metadata inherit|Trident|inherits=Abstract Arrow}}
 
 
 
{| class="wikitable"
 
! Index
 
  ! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
| Label
| VarInt
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
|colspan="2"| Loyalty level (enchantment)
+
  | See below.
  | 0
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
| URL
  | Boolean
+
  | {{Type|String}}
|colspan="2"| Has enchantment glint
+
  | Valid URL.
| False
+
|}
|}
 
  
=== Strider ===
 
 
{{Metadata inherit|Strider|inherits=Animal|start_at=16}}
 
  
 
{| class="wikitable" {{added}}
 
{| class="wikitable" {{added}}
  ! Index
+
  ! ID
  ! Type
+
  ! Name
  !style="width: 250px;" colspan="2"| Meaning
+
  ! Notes
! Default
 
 
  |-
 
  |-
| {{Metadata id|}}
 
| VarInt
 
|colspan="2"| Total time to "boost" with warped fungi for
 
 
  | 0
 
  | 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
 +
|
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 6
  | Boolean
+
  | Website
|colspan="2"| Should display name tag (true unless riding a vehicle or on or in a block tagged with strider_warm_blocks (default: lava))
+
  |  
  | false
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 7
| Boolean
+
  | Forums
|colspan="2"| Has saddle
+
  |  
| false
 
  |}
 
 
 
=== Hoglin ===
 
 
 
{{Metadata inherit|Hoglin|inherits=Animal|start_at=16}}
 
 
 
No additional metadata.
 
 
 
=== Piglin ===
 
 
 
{{Metadata inherit|Piglin|inherits=Monster|start_at=15}}
 
 
 
{| class="wikitable" {{added}}
 
  ! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 8
  | Boolean
+
  | News
|colspan="2"| Is baby
+
  |  
  | false
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 9
  | Boolean
+
  | Announcements
|colspan="2"| Is immune to zombification
+
  |  
  | false
 
 
  |-
 
  |-
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| Is charging crossbow
 
| false
 
 
  |}
 
  |}
  
=== {{Change|Zombie Pigman|Zombified Piglin}} ===
+
=== Serverbound ===
 
 
{{Metadata inherit|{{Change|Zombie Pigman|Zombified Piglin}}|inherits=Zombie|start_at=18}}
 
 
 
No additional metadata.
 
 
 
== Block Actions ==
 
 
 
No changes so far.
 
 
 
== Inventories ==
 
 
 
No changes so far.
 
 
 
== Plugin Channels ==
 
  
 
No changes so far.
 
No changes so far.
Line 231: Line 164:
 
=== Clientbound ===
 
=== Clientbound ===
  
No changes so far.
+
==== Clientbound Report Details (play) ====
 
 
=== Serverbound ===
 
  
==== Update Jigsaw Block ====
+
Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.
  
Sent when Done is pressed on the {{Minecraft Wiki|Jigsaw Block}} interface.
+
{| 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="7"| 0x27
+
  | rowspan="3"| 0x7A
  |rowspan="7"| Play
+
  | rowspan="3"| Configuration
  |rowspan="7"| Server
+
  | rowspan="3"| Client
  | Location
+
  | colspan="2"| Details Count
| Position
+
  | colspan="2"| {{Type|VarInt}} (32)
  | Block entity location
+
  | The number of details in the following array.
|- {{Removed}}
+
  |-
  | Attachment type
+
  | rowspan="2"| Details
  | Identifier
+
  | Title
  |  
+
  | rowspan="2"| {{Type|Array}}
|- {{Added}}
+
  | {{Type|String}} (128)
  | Name
+
  |
  | Identifier
 
|  
 
|- {{Added}}
 
| Target
 
| Identifier
 
|
 
|-
 
  | {{Change|Target pool|Pool}}
 
| Identifier
 
  |  
 
 
  |-
 
  |-
  | Final state
+
  | Description
  | String
+
  | {{Type|String}} (4096)
| "Turns into" on the GUI, <code>final_state</code> in NBT
+
  |
|- {{Added}}
+
|}
  | Joint type
 
| String
 
| <code>rollable</code> if the attached piece can be rotated, else <code>aligned</code>
 
|}
 
  
== Handshaking ==
+
==== Clientbound Server Links (play) ====
  
=== Clientbound ===
+
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).
  
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.
+
{| class="wikitable" {{added}}
 
 
=== Serverbound ===
 
 
 
==== Handshake ====
 
 
 
This causes the server to switch into the target state.
 
 
 
{| 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="4"| 0x00
+
  | rowspan="4"| 0x7B
  |rowspan="4"| Handshaking
+
  | rowspan="4"| Configuration
  |rowspan="4"| Server
+
  | rowspan="4"| Client
  | Protocol Version
+
  | colspan="2"| Links Count
  | VarInt
+
  | colspan="2"| {{Type|VarInt}}
| See [[protocol version numbers]] (currently {{change|578|709}})
+
| The number of links in the following array.
 
  |-
 
  |-
  | Server Address
+
  | rowspan="3"| Links
| String
+
  | Is built-in
  | Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information. Note that SRV records are a complete redirect, e.g. if _minecraft._tcp.example.com points to mc.example.org, users connecting to example.com will provide mc.example.org as server address in addition to connecting to it.
+
  | rowspan="3"| {{Type|Array}}
  |-
+
  | {{Type|Boolean}}
  | Server Port
+
  | Determines if the following label is built-in (from enum) or custom (text component).
| Unsigned Short
 
  | Default is 25565.  The Notchian server does not use this information.
 
 
  |-
 
  |-
  | Next State
+
  | Label
  | VarInt Enum
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
  | 1 for [[#Status|status]], 2 for [[#Login|login]]
+
  | See below.
  |}
+
|-
 +
| URL
 +
  | {{Type|String}}
 +
| Valid URL.
 +
|}
  
== Status ==
+
{| class="wikitable" {{added}}
 
+
  ! ID
=== Clientbound ===
+
  ! Name
 
 
No changes so far.
 
 
 
=== Serverbound ===
 
 
 
No changes so far.
 
 
 
== Login ==
 
 
 
=== Clientbound ===
 
 
 
==== Login Success ====
 
 
 
{| class="wikitable"
 
  ! Packet ID
 
  ! State
 
! Bound To
 
! Field Name
 
! Field Type
 
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="2"| 0x02
+
  | 0
  |rowspan="2"| Login
+
| Bug Report
  |rowspan="2"| Client
+
  | Displayed on connection error screen; included as a comment in the disconnection report.
  | UUID
+
  |-
  | {{Change|String (36)|Int array (4)}}
+
  | 1
  | Unlike in other packets, this field contains the UUID as {{change|a string with hyphens|a fixed length int array}}.
+
  | Community Guidelines
{{change||The UUID is encoded and decoded as follows, where the int array for decoding is read in the order the bytes are received:
+
  |  
  public static UUID decodeUuid(int[] is) {
+
|-
    return new UUID((long)is[0] << 32 <nowiki>|</nowiki> (long)is[1] & 4294967295L, (long)is[2] << 32 <nowiki>|</nowiki> (long)is[3] & 4294967295L);
+
| 2
  }
+
| Support
  public static int[] encodeUuid(long mostSignificantBits, long leastSignificantBits) {
+
|
    return new int[]{
 
        (int)(mostSignificantBits >> 32),
 
        (int)mostSignificantBits,
 
        (int)(leastSignificantBits >> 32),
 
        (int)leastSignificantBits
 
    };
 
  }
 
}}
 
 
  |-
 
  |-
  | Username
+
  | 3
  | String (16)
+
  | Status
 
  |  
 
  |  
 +
|-
 +
| 4
 +
| Feedback
 +
|
 +
|-
 +
| 5
 +
| Community
 +
|
 +
|-
 +
| 6
 +
| Website
 +
|
 +
|-
 +
| 7
 +
| Forums
 +
|
 +
|-
 +
| 8
 +
| News
 +
|
 +
|-
 +
| 9
 +
| Announcements
 +
|
 +
|-
 
  |}
 
  |}
 
This packet switches the connection state to [[#Play|play]].
 
  
 
=== Serverbound ===
 
=== Serverbound ===
  
 
No changes so far.
 
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.