Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(Updated packets for 23w12a)
(Added changes in Feature Flags and Update Recipes packets)
Line 20: Line 20:
 
!colspan="4"| Play clientbound
 
!colspan="4"| Play clientbound
 
{{PacketList|0x31|Open Sign Editor}}
 
{{PacketList|0x31|Open Sign Editor}}
 +
{{PacketList|0x6B|Feature Flags}}
 +
{{PacketList|0x6D|Update Recipes}}
 
|-
 
|-
 
!colspan="4"| Play serverbound
 
!colspan="4"| Play serverbound
Line 75: Line 77:
 
  | Boolean
 
  | Boolean
 
  | Whether the opened editor is for the front or on the back of the sign
 
  | Whether the opened editor is for the front or on the back of the sign
 +
|}
 +
 +
==== Feature Flags ====
 +
 +
Used to enable and disable features, generally experimental ones, on the client.
 +
 +
{| class="wikitable"
 +
! 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|23w12a}}, 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
 +
! State
 +
! Bound To
 +
! colspan="2"| Field Name
 +
! colspan="2"| Field Type
 +
! Notes
 +
|-
 +
| rowspan="4"| 0x6D
 +
| rowspan="4"| Play
 +
| rowspan="4"| Client
 +
| colspan="2"| Num Recipes
 +
| colspan="2"| VarInt
 +
| Number of elements in the following array.
 +
|-
 +
| rowspan="3"| Recipe
 +
| Type
 +
| rowspan="3"| Array
 +
| Identifier
 +
| The recipe type, see below.
 +
|-
 +
| Recipe ID
 +
| Identifier
 +
|
 +
|-
 +
| Data
 +
| Varies
 +
| Additional data for the recipe.
 +
|}
 +
 +
Recipe types:
 +
 +
{| class="wikitable"
 +
! Type
 +
! Description
 +
! Data
 +
|-
 +
| <code>minecraft:crafting_shapeless</code>
 +
| Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot.
 +
| 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.
 +
    |-
 +
    |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>
 +
| Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated).
 +
| 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>
 +
| Recipe for dying leather armor
 +
| 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>
 +
| Recipe for copying contents of written books
 +
|-
 +
| <code>minecraft:crafting_special_mapcloning</code>
 +
| Recipe for copying maps
 +
|-
 +
| <code>minecraft:crafting_special_mapextending</code>
 +
| Recipe for adding paper to maps
 +
|-
 +
| <code>minecraft:crafting_special_firework_rocket</code>
 +
| Recipe for making firework rockets
 +
|-
 +
| <code>minecraft:crafting_special_firework_star</code>
 +
| Recipe for making firework stars
 +
|-
 +
| <code>minecraft:crafting_special_firework_star_fade</code>
 +
| Recipe for making firework stars fade between multiple colors
 +
|-
 +
| <code>minecraft:crafting_special_repairitem</code>
 +
| Recipe for repairing items via crafting
 +
|-
 +
| <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.
 
  |}
 
  |}
  

Revision as of 03:59, 23 March 2023

This page documents the changes from the last stable Minecraft release (currently 1.19.4, protocol 762) to the current pre-release (currently 23w12a, protocol Snapshot 127). 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 so far.

Packets

ID Packet name Documentation
Play clientbound
0x31 Open Sign Editor Current Pre
0x6B Feature Flags Current Pre
0x6D Update Recipes Current Pre
Play serverbound
0x2E Update Sign Current Pre

New/modified data types

No changes so far.

Entity Metadata

No changes so far.

Entity

No changes so far.

Block Actions

No changes so far.

Inventories

No changes so far.

Plugin Channels

No changes so far.

Play

Clientbound

Open Sign Editor

Sent when the client has placed a sign and is allowed to send Update Sign. There must already be a sign at the given location (which the client does not do automatically) - send a Block Update first.

Packet ID State Bound To Field Name Field Type Notes
0x31 Play Client Location Position
Is Front Text Boolean Whether the opened editor is for the front or on the back of the sign

Feature Flags

Used to enable and disable features, generally experimental ones, on the client.

Packet ID State Bound To Field Name Field Type Notes
0x6B Play Client Total Features VarInt Number of features that appear in the array below.
Feature Flags Identifier Array

As of 1.19.4 23w12a, the following feature flags are available:

  • minecraft:vanilla - enables vanilla features
  • minecraft:bundle - enables support for the bundle
  • minecraft:update_1_20 - enables all the Minecraft 1.20 features that are available in 1.19.4

Update Recipes

Packet ID State Bound To Field Name Field Type Notes
0x6D Play Client Num Recipes VarInt Number of elements in the following array.
Recipe Type Array Identifier The recipe type, see below.
Recipe ID Identifier
Data Varies Additional data for the recipe.

Recipe types:

Type Description Data
minecraft:crafting_shapeless Shapeless crafting recipe. All items in the ingredient list must be present, but in any order/slot. As follows:
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
minecraft:crafting_shaped Shaped crafting recipe. All items must be present in the same pattern (which may be flipped horizontally or translated). As follows:
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 width * height. Indexed by x + (y * width).
Result Slot
Show notification Boolean Show a toast when the recipe is added.
minecraft:crafting_special_armordye Recipe for dying leather armor As follows:
Name Type Description
Category VarInt Enum Building = 0, Redstone = 1, Equipment = 2, Misc = 3
minecraft:crafting_special_bookcloning Recipe for copying contents of written books
minecraft:crafting_special_mapcloning Recipe for copying maps
minecraft:crafting_special_mapextending Recipe for adding paper to maps
minecraft:crafting_special_firework_rocket Recipe for making firework rockets
minecraft:crafting_special_firework_star Recipe for making firework stars
minecraft:crafting_special_firework_star_fade Recipe for making firework stars fade between multiple colors
minecraft:crafting_special_repairitem Recipe for repairing items via crafting
minecraft:crafting_special_tippedarrow Recipe for crafting tipped arrows
minecraft:crafting_special_bannerduplicate Recipe for copying banner patterns
minecraft:crafting_special_shielddecoration Recipe for applying a banner's pattern to a shield
minecraft:crafting_special_shulkerboxcoloring Recipe for recoloring a shulker box
minecraft:crafting_special_suspiciousstew Recipe for crafting suspicious stews
minecraft:crafting_decorated_pot Recipe for crafting decorated pots

Warning.png The Notchian server only sends this recipe if feature flag update_1_20 was enabled

minecraft:smelting Smelting recipe As follows:
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
minecraft:blasting Blast furnace recipe
minecraft:smoking Smoker recipe
minecraft:campfire_cooking Campfire recipe
minecraft:stonecutting Stonecutter recipe As follows:
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
minecraft:smithing Smithing table recipe

Warning.png The Notchian server only sends this recipe if feature flag update_1_20 was not enabled

As follows:
Name Type Description
Base Ingredient First item.
Addition Ingredient Second item.
Result Slot
minecraft:smithing_transform Recipe for smithing netherite gear

Warning.png The Notchian server only sends this recipe if feature flag update_1_20 was enabled. It supersedes the minecraft:smithing recipe type

As follows:
Name Type Description
Template Ingredient The smithing template.
Base Ingredient The base item.
Addition Ingredient The additional ingredient.
Result Slot
minecraft:smithing_trim Recipe for applying armor trims

Warning.png The Notchian server only sends this recipe if feature flag update_1_20 was enabled. It supersedes the minecraft:smithing recipe type

As follows:
Name Type Description
Template Ingredient The smithing template.
Base Ingredient The base item.
Addition Ingredient The additional ingredient.

Ingredient is defined as:

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

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, otherwise this packet is silently ignored.

Packet ID State Bound To Field Name Field Type Notes
0x2E Play Server Location Position Block Coordinates.
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.

Serverbound

No changes so far.

Login

Clientbound

No changes so far.

Serverbound

No changes so far.