Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(20w13a: update jigsaw block, and some entity stuff. I haven't fully confirmed the strider inheritance but I think it's right)
(Reset, added information about undocumented 1.21-pre2)
Tag: Replaced
 
(287 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|20w13a, protocol 708]]). Note that this page contains bleeding-edge information that may not be completely or correctly documented.
+
There is currently a pre-release version available: 1.21-pre2, but it has not yet been documented. For the latest stable Minecraft release, see the [[Protocol|Protocol]] page. For previous pre-release pages, see the [[Protocol version numbers|Protocol version numbers]] page.
  
 
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 12: Line 12:
  
 
=== Packets ===
 
=== Packets ===
 
{| class="wikitable"
 
! ID
 
! Packet name
 
!colspan="2"| Documentation
 
|-
 
!colspan="4"| Handshaking serverbound
 
{{PacketList|0x00|Handshake}}
 
|-
 
!colspan="4"| Play clientbound
 
{{PacketList|{{Change|0x4E|0x43}}|Spawn Position|pre=unchanged}}
 
{{PacketList|{{Change|0x43|0x44}}|Display Scoreboard|pre=unchanged}}
 
{{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 ==
 
  
 
No changes so far.
 
No changes so far.
 
== Entity Metadata ==
 
 
{{#vardefine:meta_prerelease|1}}
 
 
=== FishingHook ===
 
 
{{Metadata inherit|FishingHook|inherits=Entity|start_at=7}}
 
 
{| class="wikitable"
 
! 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
 
|}
 
 
=== Abstract Arrow ===
 
 
{{Metadata inherit|Abstract Arrow|inherits=Entity|start_at=7}}
 
 
Abstract base class for [[#Tipped Arrow|Tipped Arrow]] (which is used for regular arrows as well as tipped ones) and [[#Spectral Arrow|Spectral Arrow]].
 
 
{| class="wikitable"
 
! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
|-
 
| rowspan="3" | {{Metadata id|}}
 
| rowspan="3" | Byte
 
! Bit mask
 
! Meaning
 
| rowspan="3" | 0
 
|-
 
| 0x01
 
| Is critical
 
|-
 
| 0x02
 
| Is noclip (used by loyalty tridents when returning)
 
|- {{removed}}
 
| {{Metadata id|removed}}
 
| OptUUID
 
|colspan="2"| Unused
 
| Empty
 
|-
 
| {{Metadata id|}}
 
| Byte
 
|colspan="2"| Peircing level
 
| 0
 
|}
 
 
=== Tipped Arrow ===
 
 
{{Metadata inherit|Tipped Arrow|inherits=Abstract Arrow}}
 
 
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"
 
! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
|-
 
| {{Metadata id|}}
 
| VarInt
 
|colspan="2"| Color (-1 for no particles)
 
| -1
 
|}
 
 
=== 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|}}
 
| VarInt
 
|colspan="2"| Loyalty level (enchantment)
 
| 0
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| Has enchantment glint
 
| False
 
|}
 
 
=== Strider ===
 
 
{{Metadata inherit|Strider|inherits=Animal|start_at=16}}
 
 
{| class="wikitable"
 
! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
|-
 
| {{Metadata id|}}
 
| VarInt
 
|colspan="2"| ?
 
| 0
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| ?
 
| false
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| ?
 
| false
 
|}
 
 
=== Hoglin ===
 
 
{{Metadata inherit|Hoglin|inherits=Animal|start_at=16}}
 
 
No additional metadata.
 
 
=== Piglin ===
 
 
{{Metadata inherit|Piglin|inherits=Monster|start_at=15}}
 
 
{| class="wikitable"
 
! Index
 
! Type
 
!style="width: 250px;" colspan="2"| Meaning
 
! Default
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| Is baby
 
| false
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| Is immune to zombification
 
| false
 
|-
 
| {{Metadata id|}}
 
| Boolean
 
|colspan="2"| Is charging crossbow
 
| false
 
|}
 
 
=== {{Change|Zombie Pigman|Zombified Piglin}} ===
 
 
{{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.
 
 
== Play ==
 
 
=== Clientbound ===
 
 
No changes so far.
 
 
=== Serverbound ===
 
 
==== Update Jigsaw Block ====
 
 
Sent when Done is pressed on the {{Minecraft Wiki|Jigsaw Block}} interface.
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="4"| 0x27
 
|rowspan="4"| Play
 
|rowspan="4"| Server
 
| Location
 
| Position
 
| Block entity location
 
|-
 
| Attachment type
 
| Identifier
 
|
 
|-
 
| Target pool
 
| Identifier
 
|
 
|- {{Added}}
 
| Unknown
 
| Identifier
 
|
 
|-
 
| Final state
 
| String
 
| "Turns into" on the GUI, <code>final_state</code> in NBT
 
|- {{Added}}
 
| Unknown
 
| String
 
|
 
|}
 
 
== 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|578|708}})
 
|-
 
| 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. 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.
 
|-
 
| 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 ===
 
 
No changes so far.
 
 
== Login ==
 
 
=== Clientbound ===
 
 
==== Login Success ====
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="2"| 0x02
 
|rowspan="2"| Login
 
|rowspan="2"| Client
 
| UUID
 
| {{Change|String (36)|Int array (4)}}
 
| Unlike in other packets, this field contains the UUID as {{change|a string with hyphens|a fixed length int array}}.
 
{{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);
 
  }
 
  public static int[] encodeUuid(long mostSignificantBits, long leastSignificantBits) {
 
    return new int[]{
 
        (int)(mostSignificantBits >> 32),
 
        (int)mostSignificantBits,
 
        (int)(leastSignificantBits >> 32),
 
        (int)leastSignificantBits
 
    };
 
  }
 
}}
 
|-
 
| Username
 
| String (16)
 
|
 
|}
 
 
This packet switches the connection state to [[#Play|play]].
 
 
=== Serverbound ===
 
 
No changes so far.
 
 
  
 
[[Category:Minecraft Modern]]
 
[[Category:Minecraft Modern]]

Latest revision as of 09:24, 6 June 2024

There is currently a pre-release version available: 1.21-pre2, but it has not yet been documented. For the latest stable Minecraft release, see the Protocol page. For previous pre-release pages, see the Protocol version numbers page.

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 so far.

Packets

No changes so far.