Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(23w18a)
(Updated to 1.21-pre2)
 
(81 intermediate revisions by 7 users not shown)
Line 1: Line 1:
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently [[Protocol version numbers|1.19.4, protocol 762]]) to the current pre-release (currently [[Protocol version numbers|23w18a, protocol {{Snapshot PVN|1073741957}}]]). 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"| Play clientbound
+
!colspan="4"| Configuration clientbound
{{PacketList|0x24|Chunk Data and Update Light}}
+
{{PacketList|0x0F|Clientbound Report Details (configuration)|rel=added}}
{{PacketList|0x27|Update Light}}
+
{{PacketList|0x10|Clientbound Server Links (configuration)|rel=added}}
{{PacketList|0x31|Open Sign Editor}}
+
|-
{{PacketList|0x43|Update Section Blocks}}
+
!colspan="4"| Play clientbound
{{PacketList|0x69|Update Advancements}}
+
{{PacketList|0x7A|Clientbound Report Details (play)|rel=added}}
{{PacketList|0x6B|Feature Flags}}
+
{{PacketList|0x7B|Clientbound Server Links (play)|rel=added}}
{{PacketList|0x6D|Update Recipes}}
+
|-
|-
 
!colspan="4"| Play serverbound
 
{{PacketList|0x2E|Update Sign}}
 
 
|}
 
|}
  
== New/modified data types ==
+
== Handshake ==
  
 
No changes so far.
 
No changes so far.
  
== Entity Metadata ==
+
== Status ==
  
 
No changes so far.
 
No changes so far.
  
=== Entity ===
+
== Login ==
  
 
No changes so far.
 
No changes so far.
  
== Block Actions ==
+
== Configuration ==
 
 
No changes so far.
 
 
 
== Inventories ==
 
 
 
{| class="wikitable"
 
|-
 
! Type
 
! Name
 
! Description
 
|-
 
| 0
 
| minecraft:generic_9x1
 
| A 1-row inventory, not used by the notchian server.
 
|-
 
| 1
 
| minecraft:generic_9x2
 
| A 2-row inventory, not used by the notchian server.
 
|-
 
| 2
 
| minecraft:generic_9x3
 
| General-purpose 3-row inventory.  Used by {{Minecraft Wiki|Chest}}, {{Minecraft Wiki|minecart with chest}}, {{Minecraft Wiki|ender chest}}, and {{Minecraft Wiki|barrel}}
 
|-
 
| 3
 
| minecraft:generic_9x4
 
| A 4-row inventory, not used by the notchian server.
 
|-
 
| 4
 
| minecraft:generic_9x5
 
| A 5-row inventory, not used by the notchian server.
 
|-
 
| 5
 
| minecraft:generic_9x6
 
| General-purpose 6-row inventory, used by large chests.
 
|-
 
| 6
 
| minecraft:generic_3x3
 
| General-purpose 3-by-3 square inventory, used by {{Minecraft Wiki|Dispenser}} and {{Minecraft Wiki|Dropper}}
 
|-
 
| 7
 
| minecraft:anvil
 
| {{Minecraft Wiki|Anvil}}
 
|-
 
| 8
 
| minecraft:beacon
 
| {{Minecraft Wiki|Beacon}}
 
|-
 
| 9
 
| minecraft:blast_furnace
 
| {{Minecraft Wiki|Blast Furnace}}
 
|-
 
| 10
 
| minecraft:brewing_stand
 
| {{Minecraft Wiki|Brewing stand}}
 
|-
 
| 11
 
| minecraft:crafting
 
| {{Minecraft Wiki|Crafting table}}
 
|-
 
| 12
 
| minecraft:enchantment
 
| {{Minecraft Wiki|Enchantment table}}
 
|-
 
| 13
 
| minecraft:furnace
 
| {{Minecraft Wiki|Furnace}}
 
|-
 
| 14
 
| minecraft:grindstone
 
| {{Minecraft Wiki|Grindstone}}
 
|-
 
| 15
 
| minecraft:hopper
 
| {{Minecraft Wiki|Hopper}} or {{Minecraft Wiki|minecart with hopper}}
 
|-
 
| 16
 
| minecraft:lectern
 
| {{Minecraft Wiki|Lectern}}
 
|-
 
| 17
 
| minecraft:loom
 
| {{Minecraft Wiki|Loom}}
 
|-
 
| 18
 
| minecraft:merchant
 
| {{Minecraft Wiki|Villager}}, {{Minecraft Wiki|Wandering Trader}}
 
|-
 
| 19
 
| minecraft:shulker_box
 
| {{Minecraft Wiki|Shulker box}}
 
|- {{removed}}
 
| 20
 
| minecraft:legacy_smithing
 
| {{Minecraft Wiki|Smithing Table}}
 
{{Warning|The Notchian server only sends this type if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was '''not''' enabled}}
 
|-
 
| {{change|21|20}}
 
| minecraft:smithing
 
| {{Minecraft Wiki|Smithing Table}}
 
{{change|{{Warning|The Notchian server only sends this type if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was enabled}}|}}
 
|-
 
| {{change|22|21}}
 
| minecraft:smoker
 
| {{Minecraft Wiki|Smoker}}
 
|-
 
| {{change|23|22}}
 
| minecraft:cartography
 
| {{Minecraft Wiki|Cartography Table}}
 
|-
 
| {{change|24|23}}
 
| minecraft:stonecutter
 
| {{Minecraft Wiki|Stonecutter}}
 
|}
 
 
 
== Plugin Channels ==
 
 
 
No changes so far.
 
 
 
== Play ==
 
  
 
=== Clientbound ===
 
=== Clientbound ===
  
==== Chunk Data and Update Light ====
+
==== Clientbound Report Details (configuration) ====
{{Main|Chunk Format}}
 
{{See also|#Unload Chunk}}
 
 
 
{{Need Info|How do biomes work now?  The biome change happened at the same time as the seed change, but it's not clear how/if biomes could be computed given that it's not the actual seed...  ([https://www.reddit.com/r/Mojira/comments/e5at6i/a_discussion_for_the_changes_to_how_biomes_are/ /r/mojira discussion] which notes that it seems to be some kind of interpolation)}}
 
  
This packet sends all block entities in the chunk (though sending them is not required; it is still legal to send them with [[#Block Entity Data|Block Entity Data]] later). The light data in this packet is the same format as in the [[#Update Light|Update Light]] packet.
+
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
Line 182: Line 56:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | rowspan="21"| 0x24
+
  | rowspan="3"| 0x0F
  | rowspan="21"| Play
+
  | rowspan="3"| Configuration
  | rowspan="21"| Client
+
  | rowspan="3"| Client
  | colspan="2"| Chunk X
+
  | colspan="2"| Details Count
  | colspan="2"| Int
+
  | colspan="2"| {{Type|VarInt}} (32)
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
  | The number of details in the following array.
 
  |-
 
  |-
  | colspan="2"| Chunk Z
+
  | rowspan="2"| Details
  | colspan="2"| Int
+
  | Title
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
| rowspan="2"| {{Type|Array}}
 +
  | {{Type|String}} (128)
 +
|
 
  |-
 
  |-
  | colspan="2"| Heightmaps
+
  | Description
| colspan="2"| [[NBT]]
+
  | {{Type|String}} (4096)
| Compound containing one long array named <code>MOTION_BLOCKING</code>, which is a heightmap for the highest solid block at each position in the chunk (as a compacted long array with 256 entries, with the number of bits per entry varying depending on the world's height, defined by the formula <code>ceil(log2(height + 1))</code>). The Notchian server also adds a <code>WORLD_SURFACE</code> long array, the purpose of which is unknown, but it's not required for the chunk to be accepted.
+
  |
|-
+
|}
| colspan="2"| Size
 
| colspan="2"| VarInt
 
| Size of Data in bytes
 
|-
 
| colspan="2"| Data
 
| colspan="2"| Byte array
 
| See [[Chunk Format#Data structure|data structure]] in Chunk Format
 
|-
 
| colspan="2"| Number of block entities
 
| colspan="2"| VarInt
 
| Number of elements in the following array
 
|-
 
| rowspan="4"| Block Entity
 
| Packed XZ
 
| rowspan="4"| Array
 
| Byte
 
| The packed section coordinates, calculated from <code><nowiki>((blockX & 15) << 4) | (blockZ & 15)</nowiki></code>
 
|-
 
| Y
 
| Short
 
| The height relative to the world
 
|-
 
  | Type
 
| VarInt
 
| The type of block entity
 
|-
 
| Data
 
| [[NBT]]
 
| The block entity's data, without the X, Y, and Z values
 
|- {{removed}}
 
| colspan="2"| Trust Edges
 
| colspan="2"| Boolean
 
| If edges should be trusted for light updates.
 
|-
 
| colspan="2"| Sky Light Mask
 
| colspan="2"| BitSet
 
| BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has data in the Sky Light array below.  The least significant bit is for blocks 16 blocks to 1 block below the min world height (one section below the world), while the most significant bit covers blocks 1 to 16 blocks above the max world height (one section above the world).
 
  |-
 
| colspan="2"| Block Light Mask
 
| colspan="2"| BitSet
 
| BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has data in the Block Light array below.  The order of bits is the same as in Sky Light Mask.
 
|-
 
| colspan="2"| Empty Sky Light Mask
 
| colspan="2"| BitSet
 
| BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has all zeros for its Sky Light data.  The order of bits is the same as in Sky Light Mask.
 
|-
 
| colspan="2"| Empty Block Light Mask
 
| colspan="2"| BitSet
 
| BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has all zeros for its Block Light data.  The order of bits is the same as in Sky Light Mask.
 
|-
 
| colspan="2"| Sky Light array count
 
| colspan="2"| VarInt
 
| Number of entries in the following array; should match the number of bits set in Sky Light Mask
 
|-
 
| rowspan="2"| Sky Light arrays
 
| Length
 
| rowspan="2"| Array
 
| VarInt
 
| Length of the following array in bytes (always 2048)
 
|-
 
| Sky Light array
 
| Array of 2048 bytes
 
| There is 1 array for each bit set to true in the sky light mask, starting with the lowest value.  Half a byte per light value. Indexed <code><nowiki>((y<<8) | (z<<4) | x) / 2 </nowiki></code> If there's a remainder, masked 0xF0 else 0x0F.
 
|-
 
| colspan="2"| Block Light array count
 
| colspan="2"| VarInt
 
| Number of entries in the following array; should match the number of bits set in Block Light Mask
 
|-
 
| rowspan="2"| Block Light arrays
 
| Length
 
| rowspan="2"| Array
 
| VarInt
 
| Length of the following array in bytes (always 2048)
 
|-
 
| Block Light array
 
| Array of 2048 bytes
 
| There is 1 array for each bit set to true in the block light mask, starting with the lowest value.  Half a byte per light value. Indexed <code><nowiki>((y<<8) | (z<<4) | x) / 2 </nowiki></code> If there's a remainder, masked 0xF0 else 0x0F.
 
|}
 
 
 
Note that the Notchian client requires an [[#Set Center Chunk|Set Center Chunk]] packet when it crosses a chunk border, otherwise it'll only display render distance + 2 chunks around the chunk it spawned in.
 
 
 
The compacted array format has been adjusted so that individual entries no longer span across multiple longs, affecting the main data array and heightmaps.
 
  
New format, 5 bits per block, containing the following references to blocks in a palette (not shown): <span style="border: solid 2px hsl(0, 90%, 60%)">1</span><span style="border: solid 2px hsl(30, 90%, 60%)">2</span><span style="border: solid 2px hsl(60, 90%, 60%)">2</span><span style="border: solid 2px hsl(90, 90%, 60%)">3</span><span style="border: solid 2px hsl(120, 90%, 60%)">4</span><span style="border: solid 2px hsl(150, 90%, 60%)">4</span><span style="border: solid 2px hsl(180, 90%, 60%)">5</span><span style="border: solid 2px hsl(210, 90%, 60%)">6</span><span style="border: solid 2px hsl(240, 90%, 60%)">6</span><span style="border: solid 2px hsl(270, 90%, 60%)">4</span><span style="border: solid 2px hsl(300, 90%, 60%)">8</span><span style="border: solid 2px hsl(330, 90%, 60%)">0</span><span style="border: solid 2px hsl(0, 90%, 30%)">7</span><span style="border: solid 2px hsl(30, 90%, 30%)">4</span><span style="border: solid 2px hsl(60, 90%, 30%)">3</span><span style="border: solid 2px hsl(90, 90%, 30%)">13</span><span style="border: solid 2px hsl(120, 90%, 30%)">15</span><span style="border: solid 2px hsl(150, 90%, 30%)">16</span><span style="border: solid 2px hsl(180, 90%, 30%)">9</span><span style="border: solid 2px hsl(210, 90%, 30%)">14</span><span style="border: solid 2px hsl(240, 90%, 30%)">10</span><span style="border: solid 2px hsl(270, 90%, 30%)">12</span><span style="border: solid 2px hsl(300, 90%, 30%)">0</span><span style="border: solid 2px hsl(330, 90%, 30%)">2</span>
+
==== Clientbound Server Links (configuration) ====
  
<code>0020863148418841</code> <code><span style="outline: dashed 2px black">0000</span><span style="outline: solid 2px hsl(330, 90%, 60%)">00000</span><span style="outline: solid 2px hsl(300, 90%, 60%)">01000</span><span style="outline: solid 2px hsl(270, 90%, 60%)">00100</span><span style="outline: solid 2px hsl(240, 90%, 60%)">00110</span><span style="outline: solid 2px hsl(210, 90%, 60%)">00110</span><span style="outline: solid 2px hsl(180, 90%, 60%)">00101</span><span style="outline: solid 2px hsl(150, 90%, 60%)">00100</span><span style="outline: solid 2px hsl(120, 90%, 60%)">00100</span><span style="outline: solid 2px hsl(90, 90%, 60%)">00011</span><span style="outline: solid 2px hsl(60, 90%, 60%)">00010</span><span style="outline: solid 2px hsl(30, 90%, 60%)">00010</span><span style="outline: solid 2px hsl(0, 90%, 60%)">00001</span></code><br>
+
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).
<code>01018A7260F68C87</code> <code><span style="outline: dashed 2px black">0000</span><span style="outline: solid 2px hsl(330, 90%, 30%)">00010</span><span style="outline: solid 2px hsl(300, 90%, 30%)">00000</span><span style="outline: solid 2px hsl(270, 90%, 30%)">01100</span><span style="outline: solid 2px hsl(240, 90%, 30%)">01010</span><span style="outline: solid 2px hsl(210, 90%, 30%)">01110</span><span style="outline: solid 2px hsl(180, 90%, 30%)">01001</span><span style="outline: solid 2px hsl(150, 90%, 30%)">10000</span><span style="outline: solid 2px hsl(120, 90%, 30%)">01111</span><span style="outline: solid 2px hsl(90, 90%, 30%)">01101</span><span style="outline: solid 2px hsl(60, 90%, 30%)">00011</span><span style="outline: solid 2px hsl(30, 90%, 30%)">00100</span><span style="outline: solid 2px hsl(0, 90%, 30%)">00111</span></code>
 
  
==== Update Light ====
+
{| class="wikitable" {{added}}
 
 
Updates light levels for a chunk.  See {{Minecraft Wiki|Light}} for information on how lighting works in Minecraft.
 
 
 
{| class="wikitable"
 
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
Line 297: Line 86:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | rowspan="13"| 0x27
+
  | rowspan="4"| 0x10
  | rowspan="13"| Play
+
  | rowspan="4"| Configuration
  | rowspan="13"| Client
+
  | rowspan="4"| Client
  | colspan="2"| Chunk X
+
  | colspan="2"| Links Count
  | colspan="2"| VarInt
+
  | colspan="2"| {{Type|VarInt}}
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
  | The number of links in the following array.
 
  |-
 
  |-
  | colspan="2"| Chunk Z
+
  | rowspan="3"| Links
  | colspan="2"| VarInt
+
  | Is built-in
| Chunk coordinate (block coordinate divided by 16, rounded down)
+
| rowspan="3"| {{Type|Array}}
|- {{removed}}
+
  | {{Type|Boolean}}
  | colspan="2"| Trust Edges
+
  | Determines if the following label is built-in (from enum) or custom (text component).
| colspan="2"| Boolean
 
  | If edges should be trusted for light updates.
 
 
  |-
 
  |-
  | colspan="2"| Sky Light Mask
+
  | Label
  | colspan="2"| BitSet
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
  | BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has data in the Sky Light array below.  The least significant bit is for blocks 16 blocks to 1 block below the min world height (one section below the world), while the most significant bit covers blocks 1 to 16 blocks above the max world height (one section above the world).
+
  | See below.
 
  |-
 
  |-
  | colspan="2"| Block Light Mask
+
  | URL
  | colspan="2"| BitSet
+
| {{Type|String}}
  | BitSet containing bits for each section in the world + 2. Each set bit indicates that the corresponding 16×16×16 chunk section has data in the Block Light array below. The order of bits is the same as in Sky Light Mask.
+
  | Valid URL.
 +
|}
 +
 
 +
 
 +
{| class="wikitable" {{added}}
 +
  ! ID
 +
  ! Name
 +
  ! Notes
 
  |-
 
  |-
  | colspan="2"| Empty Sky Light Mask
+
  | 0
  | colspan="2"| BitSet
+
  | Bug Report
  | BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has all zeros for its Sky Light data.  The order of bits is the same as in Sky Light Mask.
+
  | Displayed on connection error screen; included as a comment in the disconnection report.
 
  |-
 
  |-
  | colspan="2"| Empty Block Light Mask
+
  | 1
  | colspan="2"| BitSet
+
  | Community Guidelines
  | BitSet containing bits for each section in the world + 2.  Each set bit indicates that the corresponding 16×16×16 chunk section has all zeros for its Block Light data.  The order of bits is the same as in Sky Light Mask.
+
  |  
 
  |-
 
  |-
  | colspan="2"| Sky Light array count
+
  | 2
  | colspan="2"| VarInt
+
  | Support
  | Number of entries in the following array; should match the number of bits set in Sky Light Mask
+
  |  
 
  |-
 
  |-
  | rowspan="2"| Sky Light arrays
+
  | 3
| Length
+
  | Status
| rowspan="2"| Array
+
  |  
  | VarInt
 
  | Length of the following array in bytes (always 2048)
 
 
  |-
 
  |-
  | Sky Light array
+
  | 4
  | Array of 2048 bytes
+
  | Feedback
  | There is 1 array for each bit set to true in the sky light mask, starting with the lowest value.  Half a byte per light value.
+
  |  
 
  |-
 
  |-
  | colspan="2"| Block Light array count
+
  | 5
  | colspan="2"| VarInt
+
  | Community
  | Number of entries in the following array; should match the number of bits set in Block Light Mask
+
  |  
 
  |-
 
  |-
  | rowspan="2"| Block Light arrays
+
  | 6
  | Length
+
| Website
  | rowspan="2"| Array
+
|
  | VarInt
+
|-
  | Length of the following array in bytes (always 2048)
+
| 7
 +
| Forums
 +
  |  
 +
  |-
 +
| 8
 +
  | News
 +
  |  
 
  |-
 
  |-
  | Block Light array
+
  | 9
  | Array of 2048 bytes
+
  | Announcements
  | There is 1 array for each bit set to true in the block light mask, starting with the lowest value.  Half a byte per light value.
+
  |  
|}
 
 
 
A bit will never be set in both the block light mask and the empty block light mask, though it may be present in neither of them (if the block light does not need to be updated for the corresponding chunk section).  The same applies to the sky light mask and the empty sky light mask.
 
 
 
==== Open Sign Editor ====
 
 
 
Sent when the client has placed a sign and is allowed to send [[#Update Sign|Update Sign]].  There must already be a sign at the given location (which the client does not do automatically) - send a [[#Block Update|Block Update]] first.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
 
  |-
 
  |-
| rowspan="2" | 0x31
 
| rowspan="2" | Play
 
| rowspan="2" | Client
 
| Location
 
| Position
 
|
 
|- {{added}}
 
| Is Front Text
 
| Boolean
 
| Whether the opened editor is for the front or on the back of the sign
 
 
  |}
 
  |}
  
==== Update Section Blocks ====
+
=== Serverbound ===
  
Fired whenever 2 or more blocks are changed within the same chunk on the same tick.
+
No changes so far.
  
{{Warning|Changing blocks in chunks not loaded by the client is unsafe (see note on [[#Block Update|Block Update]]).}}
+
== Play ==
  
{| class="wikitable"
+
=== Clientbound ===
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
| rowspan="4"| 0x43
 
| rowspan="4"| Play
 
| rowspan="4"| Client
 
| Chunk section position
 
| Long
 
| Chunk section coordinate (encoded chunk x and z with each 22 bits, and section y with 20 bits, from left to right).
 
|- {{removed}}
 
| Suppress Light Updates
 
| Boolean
 
| Whether to ignore light updates caused by the contained changes. Always inverse the preceding Update Light packet's "Trust Edges" bool
 
|-
 
| Blocks array size
 
| VarInt
 
| Number of elements in the following array.
 
|-
 
| Blocks
 
| Array of VarLong
 
| Each entry is composed of the block state id, shifted left by 12, and the relative block position in the chunk section (4 bits for x, z, and y, from left to right).
 
|}
 
 
 
Chunk section position is encoded:
 
<syntaxhighlight lang="java">
 
((sectionX & 0x3FFFFF) << 42) | (sectionY & 0xFFFFF) | ((sectionZ & 0x3FFFFF) << 20);
 
</syntaxhighlight>
 
and decoded:
 
<syntaxhighlight lang="java">
 
sectionX = long >> 42;
 
sectionY = long << 44 >> 44;
 
sectionZ = long << 22 >> 42;
 
</syntaxhighlight>
 
  
Blocks are encoded:
+
==== Clientbound Report Details (play) ====
<syntaxhighlight lang="java">
 
blockStateId << 12 | (blockLocalX << 8 | blockLocalZ << 4 | blockLocalY)
 
//Uses the local position of the given block position relative to its respective chunk section
 
</syntaxhighlight>
 
  
==== Update Advancements ====
+
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
Line 444: Line 176:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | rowspan="9"| 0x69
+
  | rowspan="3"| 0x7A
  | rowspan="9"| Play
+
  | rowspan="3"| Configuration
  | rowspan="9"| Client
+
  | rowspan="3"| Client
  | colspan="2"| Reset/Clear
+
  | colspan="2"| Details Count
  | colspan="2"| Boolean
+
  | colspan="2"| {{Type|VarInt}} (32)
| Whether to reset/clear the current advancements.
+
  | The number of details in the following array.
|-
 
| colspan="2"| Mapping size
 
| colspan="2"| VarInt
 
| Size of the following array.
 
|-
 
| rowspan="2"| Advancement mapping
 
| Key
 
| rowspan="2"| Array
 
| Identifier
 
| The identifier of the advancement.
 
|-
 
| Value
 
| Advancement
 
| See below
 
|-
 
| colspan="2"| List size
 
| colspan="2"| VarInt
 
| Size of the following array.
 
|-
 
| colspan="2"| Identifiers
 
| colspan="2"| Array of Identifier
 
| The identifiers of the advancements that should be removed.
 
|-
 
| colspan="2"| Progress size
 
| colspan="2"| VarInt
 
| Size of the following array.
 
|-
 
| rowspan="2"| Progress mapping
 
| Key
 
| rowspan="2"| Array
 
| Identifier
 
| The identifier of the advancement.
 
|-
 
| Value
 
| Advancement progress
 
| See below.
 
|}
 
 
 
Advancement structure:
 
 
 
{| class="wikitable"
 
! colspan="2"| Field Name
 
! colspan="2"| Field Type
 
! Notes
 
|-
 
| colspan="2"| Has parent
 
| colspan="2"| Boolean
 
| Indicates whether the next field exists.
 
|-
 
| colspan="2"| Parent id
 
| colspan="2"| Optional Identifier
 
| The identifier of the parent advancement.
 
|-
 
| colspan="2"| Has display
 
| colspan="2"| Boolean
 
| Indicates whether the next field exists.
 
|-
 
| colspan="2"| Display data
 
| colspan="2"| Optional advancement display
 
| See below.
 
|-
 
| colspan="2"| Number of criteria
 
| colspan="2"| VarInt
 
| Size of the following array.
 
|-
 
| rowspan="2"| Criteria
 
| Key
 
| rowspan="2"| Array
 
| Identifier
 
  | The identifier of the criterion.
 
|-
 
| Value
 
| '''Void'''
 
| There is ''no'' content written here. Perhaps this will be expanded in the future?
 
|-
 
| colspan="2"| Array length
 
| colspan="2"| VarInt
 
| Number of arrays in the following array.
 
|-
 
| rowspan="2"| Requirements
 
| Array length 2
 
| rowspan="2"| Array
 
| VarInt
 
| Number of elements in the following array.
 
|-
 
| Requirement
 
| Array of String
 
| Array of required criteria.
 
|- {{added}}
 
| colspan="2"| Sends telemetry data
 
| colspan="2"| Boolean
 
| Whether the client should include this achievement in the telemetry data when it's completed.
 
The Notchian client only sends data for advancements on the <code>minecraft</code> namespace.
 
|}
 
 
 
Advancement display:
 
 
 
{| class="wikitable"
 
! Field Name
 
! Field Type
 
! Notes
 
 
  |-
 
  |-
 +
| rowspan="2"| Details
 
  | Title
 
  | Title
  | Chat
+
  | rowspan="2"| {{Type|Array}}
 +
| {{Type|String}} (128)
 
  |
 
  |
 
  |-
 
  |-
 
  | Description
 
  | Description
  | Chat
+
  | {{Type|String}} (4096)
 
  |
 
  |
|-
+
|}
| Icon
 
| [[Slot]]
 
|
 
|-
 
| Frame type
 
| VarInt Enum
 
| 0 = <code>task</code>, 1 = <code>challenge</code>, 2 = <code>goal</code>.
 
|-
 
| Flags
 
| Int
 
| 0x01: has background texture; 0x02: <code>show_toast</code>; 0x04: <code>hidden</code>.
 
|-
 
| Background texture
 
| Optional Identifier
 
| Background texture location.  Only if flags indicates it.
 
|-
 
| X coord
 
| Float
 
|
 
|-
 
| Y coord
 
| Float
 
|
 
|}
 
  
Advancement progress:
+
==== Clientbound Server Links (play) ====
  
{| class="wikitable"
+
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).
! colspan="2"| Field Name
 
! colspan="2"| Field Type
 
! Notes
 
|-
 
| colspan="2"| Size
 
| colspan="2"| VarInt
 
| Size of the following array.
 
|-
 
| rowspan="2"| Criteria
 
| Criterion identifier
 
| rowspan="2"| Array
 
| Identifier
 
| The identifier of the criterion.
 
|-
 
| Criterion progress
 
| Criterion progress
 
|
 
|}
 
 
 
Criterion progress:
 
 
 
{| class="wikitable"
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
| Achieved
 
| Boolean
 
| If true, next field is present.
 
|-
 
| Date of achieving
 
| Optional Long
 
| As returned by [https://docs.oracle.com/javase/6/docs/api/java/util/Date.html#getTime() <code>Date.getTime</code>].
 
|}
 
 
 
==== Feature Flags ====
 
 
 
Used to enable and disable features, generally experimental ones, on the client.
 
  
{| class="wikitable"
+
{| class="wikitable" {{added}}
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
| rowspan="2"| 0x6B
 
| rowspan="2"| Play
 
| rowspan="2"| Client
 
| Total Features
 
| VarInt
 
| Number of features that appear in the array below.
 
|-
 
| Feature Flags
 
| Identifier Array
 
|
 
|}
 
 
 
As of {{change|1.19.4|1.20}}, the following feature flags are available:
 
 
 
* minecraft:vanilla - enables vanilla features</li>
 
* minecraft:bundle - enables support for the bundle</li>
 
* {{change|minecraft:update_1_20 - enables all the Minecraft 1.20 features that are available in 1.19.4</li>|}}
 
 
 
==== Update Recipes ====
 
 
 
{| class="wikitable"
 
 
  ! Packet ID
 
  ! Packet ID
 
  ! State
 
  ! State
Line 663: Line 206:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | rowspan="4"| 0x6D
+
  | rowspan="4"| 0x7B
  | rowspan="4"| Play
+
  | rowspan="4"| Configuration
 
  | rowspan="4"| Client
 
  | rowspan="4"| Client
  | colspan="2"| Num Recipes
+
  | colspan="2"| Links Count
  | colspan="2"| VarInt
+
  | colspan="2"| {{Type|VarInt}}
  | Number of elements in the following array.
+
  | The number of links in the following array.
 
  |-
 
  |-
  | rowspan="3"| Recipe
+
  | rowspan="3"| Links
  | Type
+
  | Is built-in
  | rowspan="3"| Array
+
  | rowspan="3"| {{Type|Array}}
  | Identifier
+
  | {{Type|Boolean}}
  | The recipe type, see below.
+
  | Determines if the following label is built-in (from enum) or custom (text component).
 
  |-
 
  |-
  | Recipe ID
+
  | Label
  | Identifier
+
  | {{Type|VarInt}} {{Type|Enum}} / {{Type|Text Component}}
  |
+
  | See below.
 
  |-
 
  |-
  | Data
+
  | URL
  | Varies
+
  | {{Type|String}}
  | Additional data for the recipe.
+
  | Valid URL.
|}
+
|}
  
Recipe types:
+
{| class="wikitable" {{added}}
 
+
  ! ID
{| class="wikitable"
+
  ! Name
  ! Type
+
  ! Notes
  ! Description
 
  ! Data
 
 
  |-
 
  |-
  | <code>minecraft:crafting_shapeless</code>
+
  | 0
  | Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot.
+
  | Bug Report
  | As follows:
+
  | Displayed on connection error screen; included as a comment in the disconnection report.
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Group
 
    | String
 
    | Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.
 
    |-
 
    |Category
 
    |VarInt Enum
 
    |Building = 0, Redstone = 1, Equipment = 2, Misc = 3
 
    |-
 
    | Ingredient count
 
    | VarInt
 
    | Number of elements in the following array.
 
    |-
 
    | Ingredients
 
    | Array of Ingredient.
 
    |
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |
 
    |}
 
 
  |-
 
  |-
  | <code>minecraft:crafting_shaped</code>
+
  | 1
  | Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated).
+
  | Community Guidelines
  | As follows:
+
  |  
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Width
 
    | VarInt
 
    |
 
    |-
 
    | Height
 
    | VarInt
 
    |
 
    |-
 
    | Group
 
    | String
 
    | Used to group similar recipes together in the recipe book. Tag is present in recipe JSON.
 
    |-
 
    |Category
 
    |VarInt Enum
 
    |Building = 0, Redstone = 1, Equipment = 2, Misc = 3
 
    |-
 
    | Ingredients
 
    | Array of Ingredient
 
    | Length is <code>width * height</code>. Indexed by <code>x + (y * width)</code>.
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |-
 
    | Show notification
 
    | Boolean
 
    | Show a toast when the recipe is [[Protocol#Update_Recipe_Book|added]].
 
    |}
 
 
  |-
 
  |-
  | <code>minecraft:crafting_special_armordye</code>
+
  | 2
  | Recipe for dying leather armor
+
  | Support
  | rowspan="14" | As follows:
+
  |  
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    |Category
 
    |VarInt Enum
 
    |Building = 0, Redstone = 1, Equipment = 2, Misc = 3
 
    |}
 
 
  |-
 
  |-
  | <code>minecraft:crafting_special_bookcloning</code>
+
  | 3
  | Recipe for copying contents of written books
+
| Status
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_mapcloning</code>
+
  | 4
  | Recipe for copying maps
+
| Feedback
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_mapextending</code>
+
  | 5
  | Recipe for adding paper to maps
+
| Community
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_firework_rocket</code>
+
  | 6
  | Recipe for making firework rockets
+
| Website
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_firework_star</code>
+
  | 7
  | Recipe for making firework stars
+
| Forums
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_firework_star_fade</code>
+
  | 8
  | Recipe for making firework stars fade between multiple colors
+
| News
 +
  |  
 
  |-
 
  |-
  | <code>minecraft:crafting_special_repairitem</code>
+
  | 9
  | Recipe for repairing items via crafting
+
  | Announcements
  |-
+
  |  
| <code>minecraft:crafting_special_tippedarrow</code>
 
| Recipe for crafting tipped arrows
 
 
  |-
 
  |-
| <code>minecraft:crafting_special_bannerduplicate</code>
 
| Recipe for copying banner patterns
 
|-
 
| <code>minecraft:crafting_special_shielddecoration</code>
 
| Recipe for applying a banner's pattern to a shield
 
|-
 
| <code>minecraft:crafting_special_shulkerboxcoloring</code>
 
| Recipe for recoloring a shulker box
 
|-
 
| <code>minecraft:crafting_special_suspiciousstew</code>
 
| Recipe for crafting suspicious stews
 
|-
 
| <code>minecraft:crafting_decorated_pot</code>
 
| Recipe for crafting decorated pots
 
{{change|{{Warning|The Notchian server only sends this recipe if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was enabled}}|}}
 
|-
 
| <code>minecraft:smelting</code>
 
| Smelting recipe
 
| rowspan="4"| As follows:
 
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Group
 
    | String
 
    | Used to group similar recipes together in the recipe book.
 
    |-
 
    |Category
 
    |VarInt Enum
 
    |Food = 0, Blocks = 1, Misc = 2
 
    |-
 
    | Ingredient
 
    | Ingredient
 
    |
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |
 
    |-
 
    | Experience
 
    | Float
 
    |
 
    |-
 
    | Cooking time
 
    | VarInt
 
    |
 
    |}
 
|-
 
| <code>minecraft:blasting</code>
 
| Blast furnace recipe
 
|-
 
| <code>minecraft:smoking</code>
 
| Smoker recipe
 
|-
 
| <code>minecraft:campfire_cooking</code>
 
| Campfire recipe
 
|-
 
| <code>minecraft:stonecutting</code>
 
| Stonecutter recipe
 
| As follows:
 
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Group
 
    | String
 
    | Used to group similar recipes together in the recipe book.  Tag is present in recipe JSON.
 
    |-
 
    | Ingredient
 
    | Ingredient
 
    |
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |
 
    |}
 
|- {{removed}}
 
| <code>minecraft:smithing</code>
 
| Smithing table recipe
 
{{Warning|The Notchian server only sends this recipe if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was '''not''' enabled}}
 
| As follows:
 
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Base
 
    | Ingredient
 
    | First item.
 
    |-
 
    | Addition
 
    | Ingredient
 
    | Second item.
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |
 
    |}
 
|-
 
| <code>minecraft:smithing_transform</code>
 
| Recipe for smithing netherite gear
 
{{change|{{Warning2|The Notchian server only sends this recipe if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was enabled. It supersedes the <code>minecraft:smithing</code> recipe type}}|}}
 
| As follows:
 
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Template
 
    | Ingredient
 
    | The smithing template.
 
    |-
 
    | Base
 
    | Ingredient
 
    | The base item.
 
    |-
 
    | Addition
 
    | Ingredient
 
    | The additional ingredient.
 
    |-
 
    | Result
 
    | [[Slot]]
 
    |
 
    |}
 
|-
 
| <code>minecraft:smithing_trim</code>
 
| Recipe for applying armor trims
 
{{change|{{Warning2|The Notchian server only sends this recipe if [[Protocol#Feature_Flags|feature flag]] '''update_1_20''' was enabled. It supersedes the <code>minecraft:smithing</code> recipe type}}|}}
 
| As follows:
 
  {| class="wikitable"
 
    ! Name
 
    ! Type
 
    ! Description
 
    |-
 
    | Template
 
    | Ingredient
 
    | The smithing template.
 
    |-
 
    | Base
 
    | Ingredient
 
    | The base item.
 
    |-
 
    | Addition
 
    | Ingredient
 
    | The additional ingredient.
 
    |}
 
|}
 
 
Ingredient is defined as:
 
 
{| class="wikitable"
 
! Name
 
! Type
 
! Description
 
|-
 
| Count
 
| VarInt
 
| Number of elements in the following array.
 
|-
 
| Items
 
| Array of [[Slot]]
 
| Any item in this array may be used for the recipe.  The count of each item should be 1.
 
 
  |}
 
  |}
  
 
=== Serverbound ===
 
=== Serverbound ===
 
==== Update Sign ====
 
 
This message is sent from the client to the server when the “Done” button is pushed after placing a sign.
 
 
The server only accepts this packet after [[#Open Sign Editor|Open Sign Editor]], otherwise this packet is silently ignored.
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
| rowspan="6"| 0x2E
 
| rowspan="6"| Play
 
| rowspan="6"| Server
 
| Location
 
| Position
 
| Block Coordinates.
 
|- {{added}}
 
| Is Front Text
 
| Boolean
 
| Whether the updated text is in front or on the back of the sign
 
|-
 
| Line 1
 
| String (384)
 
| First line of text in the sign.
 
|-
 
| Line 2
 
| String (384)
 
| Second line of text in the sign.
 
|-
 
| Line 3
 
| String (384)
 
| Third line of text in the sign.
 
|-
 
| Line 4
 
| String (384)
 
| Fourth line of text in the sign.
 
|}
 
 
== Status ==
 
 
=== Clientbound ===
 
  
 
No changes so far.
 
No changes so far.
 
=== Serverbound ===
 
 
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.