Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
m (Added missing ")
(Updated to 1.21-pre2)
 
Line 1: Line 1:
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently 1.3.2) to the current pre-release (or weekly release).
+
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.
  
== New packets ==
+
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.
  
-None-
+
== Contents ==
  
== Changed packets ==
+
<div style="float:right;">__TOC__</div>
  
=== Time Update (0x04) ===
+
=== Data types ===
  
''Server to Client''
+
No changes documented so far.
  
Time is based on ticks, where 20 ticks happen every second. There are 24000 ticks in a day, making Minecraft days exactly 20 minutes long.
+
=== Packets ===
  
The time of day is based on the timestamp modulo 24000. 0 is sunrise, 6000 is noon, 12000 is sunset, and 18000 is midnight.
+
{| class="wikitable"
 +
! ID
 +
! Packet name
 +
!colspan="2"| Documentation
 +
|-
 +
!colspan="4"| Configuration clientbound
 +
{{PacketList|0x0F|Clientbound Report Details (configuration)|rel=added}}
 +
{{PacketList|0x10|Clientbound Server Links (configuration)|rel=added}}
 +
|-
 +
!colspan="4"| Play clientbound
 +
{{PacketList|0x7A|Clientbound Report Details (play)|rel=added}}
 +
{{PacketList|0x7B|Clientbound Server Links (play)|rel=added}}
 +
|-
 +
|}
  
The default SMP server increments both by 20 every second.
+
== Handshake ==
  
The &#39;Time&#39; is the Age of the world. It is not changing on server commands and will increased by 20 every second.
+
No changes so far.
  
{| class="wikitable"
+
== Status ==
|- class="row0"
 
! class="col0" | Packet ID
 
! class="col1" | Field Name
 
! class="col2" | Field Type
 
! class="col3" | Example
 
! class="col4" | Notes
 
|- class="row1"
 
| class="col0 centeralign" rowspan="2" | 0x04
 
| class="col1 centeralign" | Time
 
| class="col2 centeralign" | long
 
| class="col3 centeralign" | 45464654
 
| class="col4" | The &#39;Age of the world&#39;, in ticks
 
  
|- class="row2"
+
No changes so far.
| class="col0 centeralign" | Day Time
 
| class="col1 centeralign" | long
 
| class="col2 centeralign" | 21321
 
| class="col3" | The world (or region) time, in ticks
 
|- class="row3"
 
! class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 17 Bytes
 
|}
 
  
=== Spawn Named Entity (0x14) ===
+
== Login ==
  
See the change in metadata [[#metadata|below]]. (Under Protocol History, 2012-08-24)
+
No changes so far.
  
=== Spawn Dropped Item (0x15) ===
+
== Configuration ==
  
'''''TODO'''''
+
=== Clientbound ===
  
It includes a new byte array after the "Damage" field, and before the "X" field if certain conditions are met. If the array does not exist, then the length of the array is "-1".
+
==== Clientbound Report Details (configuration) ====
  
=== Spawn Mob (0x18) ===
+
Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.
  
See the change in metadata [[#metadata|below]]. (Under Protocol History, 2012-08-24)
+
{| class="wikitable" {{added}}
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
! Notes
 +
|-
 +
| rowspan="3"| 0x0F
 +
| rowspan="3"| Configuration
 +
| rowspan="3"| Client
 +
| colspan="2"| Details Count
 +
| colspan="2"| {{Type|VarInt}} (32)
 +
| The number of details in the following array.
 +
|-
 +
| rowspan="2"| Details
 +
| Title
 +
| rowspan="2"| {{Type|Array}}
 +
| {{Type|String}} (128)
 +
|
 +
|-
 +
| Description
 +
| {{Type|String}} (4096)
 +
|
 +
|}
  
=== Entity Metadata (0x28) ===
+
==== Clientbound Server Links (configuration) ====
  
See the change in metadata [[#metadata|below]]. (Under Protocol History, 2012-08-24)
+
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).
  
== Changed data types ==
+
{| class="wikitable" {{added}}
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
! 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.
 +
|-
 +
| rowspan="3"| Links
 +
| Is built-in
 +
| rowspan="3"| {{Type|Array}}
 +
| {{Type|Boolean}}
 +
| Determines if the following label is built-in (from enum) or custom (text component).
 +
|-
 +
| Label
 +
| {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
 +
| See below.
 +
|-
 +
| URL
 +
| {{Type|String}}
 +
| Valid URL.
 +
|}
  
{{anchor|metadata}}
 
== Entity Metadata Format ==
 
  
Note that entity metadata is a totally distinct concept from block metadata.
+
{| class="wikitable" {{added}}
 +
! 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
 +
|
 +
|-
 +
|}
  
The entity metadata format is quirky dictionary format, where the key and the value's type are packed in a single byte.
+
=== Serverbound ===
  
To parse, repeat the following procedure:
+
No changes so far.
  
# Read an unsigned byte
+
== Play ==
# If this byte == 127, stop reading
 
# Decompose the byte. <br> The bottom 5 bits (0x1F) serve as an identifier (key) for the data to follow. <br> The top 3 bits (0xE0) serve as a type.
 
# Read and unpack based on the type (below)
 
  
{| class="wikitable"
+
=== Clientbound ===
|-
 
! Type
 
! Meaning
 
|-
 
| 0
 
| byte
 
|-
 
| 1
 
| short
 
|-
 
| 2
 
| int
 
|-
 
| 3
 
| float
 
|-
 
| 4
 
| string16
 
|-
 
| 5
 
| short, byte, short (slot type) - If first short is empty, no further data is sent.
 
|-
 
| 6
 
| int, int, int (x, y, z)
 
|}
 
  
In Python-like code:
+
==== Clientbound Report Details (play) ====
<source lang="python">
 
#socket is positioned at the beginning of the metadata array. Also note that the method unpack() doesn't exist in socket
 
metadata = {}
 
x = socket.unpack('byte')
 
while x != 127:
 
    index = x & 0x1F # Lower 5 bits
 
    ty    = x >> 5  # Upper 3 bits
 
    if ty == 0: val = socket.unpack('byte')  
 
    if ty == 1: val = socket.unpack('short')
 
    if ty == 2: val = socket.unpack('int')
 
    if ty == 3: val = socket.unpack('float')
 
    if ty == 4: val = socket.unpack('string16')
 
    if ty == 5:
 
        val = {}
 
        val["id"] = socket.unpack('short')
 
        if val["id"] != -1:
 
            val["count"]  = socket.unpack('byte')
 
            val["damage"] = socket.unpack('short')
 
    if ty == 6:
 
        val = []
 
        for i in range(3):
 
            val.append(socket.unpack('int'))
 
    metadata[index] = (ty, val)
 
    x = socket.unpack('byte')
 
return metadata
 
</source>
 
  
== Removed packets ==
+
Contains a list of key-value text entries that are included in any crash or disconnection report generated during connection to the server.
  
-None-
+
{| class="wikitable" {{added}}
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
! Notes
 +
|-
 +
| rowspan="3"| 0x7A
 +
| rowspan="3"| Configuration
 +
| rowspan="3"| Client
 +
| colspan="2"| Details Count
 +
| colspan="2"| {{Type|VarInt}} (32)
 +
| The number of details in the following array.
 +
|-
 +
| rowspan="2"| Details
 +
| Title
 +
| rowspan="2"| {{Type|Array}}
 +
| {{Type|String}} (128)
 +
|
 +
|-
 +
| Description
 +
| {{Type|String}} (4096)
 +
|
 +
|}
  
== Protocol History ==
+
==== Clientbound Server Links (play) ====
  
=== 2012-09-06 ===
+
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).
* 12w36a
+
 
* Protocol version is now 42
+
{| class="wikitable" {{added}}
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
! Notes
 +
|-
 +
| rowspan="4"| 0x7B
 +
| rowspan="4"| Configuration
 +
| rowspan="4"| Client
 +
| colspan="2"| Links Count
 +
| colspan="2"| {{Type|VarInt}}
 +
| The number of links in the following array.
 +
|-
 +
| rowspan="3"| Links
 +
| Is built-in
 +
| rowspan="3"| {{Type|Array}}
 +
| {{Type|Boolean}}
 +
| Determines if the following label is built-in (from enum) or custom (text component).
 +
|-
 +
| Label
 +
| {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
 +
| See below.
 +
|-
 +
| URL
 +
| {{Type|String}}
 +
| Valid URL.
 +
|}
  
=== 2012-08-24 ===
+
{| class="wikitable" {{added}}
* 12w34b
+
! ID
* Protocol version is now 41
+
! 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
 +
|
 +
|-
 +
|}
  
* Changed Entity Metadata Format
+
=== Serverbound ===
  
=== 2012-08-09 ===
+
No changes so far.
* 12w32a
 
* Protocol version is now 40
 
  
* Changed Time Update packet
+
[[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.