Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(Fix: clientbound packets are listed under "serverbound" in packet table)
m (Add type to system message)
 
(82 intermediate revisions by 16 users not shown)
Line 1: Line 1:
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently [[Protocol version numbers|1.16.4, protocol 754]]) to the current pre-release (currently [[Protocol version numbers|20w48a, protocol 1073741831]]). 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.18.2, protocol 758]]) to the current pre-release (currently [[Protocol version numbers|22w16b, protocol {{Snapshot PVN|1073741905}}]]). 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 12: Line 12:
  
 
=== Packets ===
 
=== Packets ===
 +
 +
Packet ID shifts have not been included.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 19: Line 21:
 
  |-
 
  |-
 
!colspan="4"| Play clientbound
 
!colspan="4"| Play clientbound
{{PacketList|0x20|Chunk Data}}
+
{{PacketList|0x02|Spawn Living Entity|pre=removed}}
{{PacketList|0x23|Update Light}}
+
{{PacketList|0x03|Spawn Painting|pre=removed}}
{{PacketList|0x25|Map Data}}
+
{{PacketList|0x05|Sculk Vibration Signal|pre=removed}}
{{PacketList|0x38|Resource Pack Send}}
+
{{PacketList|0x05|Acknowledge Block Changes|rel=added}}
 +
{{PacketList|0x08|Acknowledge Player Digging|pre=removed}}
 +
{{PacketList|0x5C|System Message|rel=added}}
 +
 
 +
|-
 +
!colspan="4"| Play serverbound
 
  |-
 
  |-
 
!colspan="4"| Handshaking serverbound
 
!colspan="4"| Handshaking serverbound
{{PacketList|0x00|Handshake}}
 
 
  |}
 
  |}
  
Line 34: Line 40:
 
== Entity Metadata ==
 
== Entity Metadata ==
  
{{#vardefine:meta_prerelease|1}}
+
=== Goat ===
  
{{Warning2|Note that other entities have had metadata shifts due to these changes, not shown here.}}
+
{{Metadata inherit|Goat}}
  
=== Entity ===
+
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
! Default
 +
|-
 +
| {{Metadata id|}}
 +
| Boolean
 +
|colspan="2"| Is Screaming Goat
 +
| false
 +
|- {{added}}
 +
| {{Metadata id|}}
 +
| Boolean
 +
|colspan="2"| Has Left Horn
 +
| true
 +
|- {{added}}
 +
| {{Metadata id|}}
 +
| Boolean
 +
|colspan="2"| Has Right Horn
 +
| true
 +
|-
 +
|}
 +
 
 +
=== Painting ===
 +
 
 +
{{Metadata inherit|Painting}}
 +
 
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
! Default
 +
|- {{added}}
 +
| {{Metadata id|}}
 +
| VarInt
 +
|colspan="2"| PaintingVariant
 +
| 0
 +
|}
 +
 
 +
=== Player ===
  
{{metadata inherit|Entity}}
+
{{Metadata inherit|Player}}
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 48: Line 93:
 
  ! Default
 
  ! Default
 
  |-
 
  |-
  |rowspan="9"| {{Metadata id|}}
+
  | {{Metadata id|}}
  |rowspan="9"| Byte
+
  | Float
  ! Bit mask
+
|colspan="2"| Additional Hearts
! Meaning
+
  | 0.0
|rowspan="9"| 0
 
 
  |-
 
  |-
  | 0x01
+
  | {{Metadata id|}}
  | Is on fire
+
| VarInt
 +
|colspan="2"| Score
 +
  | 0
 
  |-
 
  |-
  | 0x02
+
  |rowspan="10"| {{Metadata id|}}
  | Is crouching
+
|rowspan="10"| Byte
 +
|colspan="2"| The Displayed Skin Parts bit mask that is sent in [[Protocol#Client Settings|Client Settings]]
 +
  |rowspan="10"| 0
 
  |-
 
  |-
  | 0x04
+
  ! Bit mask !! Meaning
| Unused (previously riding)
 
 
  |-
 
  |-
  | 0x08
+
  | 0x01 || Cape enabled
| Is sprinting
 
 
  |-
 
  |-
  | 0x10
+
  | 0x02 || Jacket enabled
| Is swimming
 
 
  |-
 
  |-
  | 0x20
+
  | 0x04 || Left sleeve enabled
| Is invisible
 
 
  |-
 
  |-
  | 0x40
+
  | 0x08 || Right sleeve enabled
| has glowing effect
 
 
  |-
 
  |-
  | 0x80
+
  | 0x10 || Left pants leg enabled
| Is flying with an {{Minecraft Wiki|elytra}}
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 0x20 || Right pants leg enabled
| VarInt
 
|colspan="2"| Air ticks
 
| 300
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 0x40 || Hat enabled
| OptChat
 
|colspan="2"| Custom name
 
| empty
 
 
  |-
 
  |-
  | {{Metadata id|}}
+
  | 0x80 || ''Unused''
| Boolean
 
|colspan="2"| Is custom name visible
 
| false
 
 
  |-
 
  |-
 
  | {{Metadata id|}}
 
  | {{Metadata id|}}
  | Boolean
+
  | Byte
  |colspan="2"| Is silent
+
  |colspan="2"| Main hand (0 : Left, 1 : Right)
  | false
+
  | 1
 
  |-
 
  |-
 
  | {{Metadata id|}}
 
  | {{Metadata id|}}
  | Boolean
+
  | [[NBT]]
  |colspan="2"| Has no gravity
+
  |colspan="2"| Left shoulder entity data (for occupying parrot)
  | false
+
  | Empty
 
  |-
 
  |-
 
  | {{Metadata id|}}
 
  | {{Metadata id|}}
  | Pose
+
  | [[NBT]]
  |colspan="2"| Pose
+
  |colspan="2"| Right shoulder entity data (for occupying parrot)
  | STANDING
+
  | Empty
 
  |- {{added}}
 
  |- {{added}}
  | {{Metadata id|added}}
+
  | {{Metadata id|}}
  | VarInt
+
  | Global Position
  |colspan="2"| Ticks frozen in powdered snow
+
  |colspan="2"| Optional Last Death Location (used for respawn compass)
  | 0
+
  | Empty
 
  |}
 
  |}
 +
 +
 +
 +
=== Entity ===
 +
 +
No changes so far.
  
 
== Block Actions ==
 
== Block Actions ==
Line 130: Line 169:
 
=== Clientbound ===
 
=== Clientbound ===
  
==== Chunk Data ====
+
==== Spawn Entity ====
{{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, and 3D biomes are only used in the nether)}}
 
  
The server only sends skylight information for chunk pillars in the {{Minecraft Wiki|Overworld}}, it's up to the client to know in which dimension the player is currently located. You can also infer this information from the primary bitmask and the amount of uncompressed bytes sent.  This packet also sends all block entities in the chunk (though sending them is not required; it is still legal to send them with [[#Update Block Entity|Update Block Entity]] later).
+
Sent by the server when a vehicle or other non-living entity is created.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 146: Line 181:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="11"| 0x20
+
  |rowspan="13"| 0x00
  |rowspan="11"| Play
+
  |rowspan="13"| Play
  |rowspan="11"| Client
+
  |rowspan="13"| Client
  | Chunk X
+
  | Entity ID
  | Int
+
  | VarInt
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
  | Entity ID.
 
  |-
 
  |-
  | Chunk Z
+
  | Object UUID
  | Int
+
  | UUID
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
  |  
|- {{removed}}
 
| Full chunk
 
| Boolean
 
| See [[Chunk Format#Full chunk|Chunk Format]]
 
 
  |-
 
  |-
  | Primary Bit Mask
+
  | Type
 
  | VarInt
 
  | VarInt
  | Bitmask with bits set to 1 for every 16×16×16 chunk section whose data is included in Data. The least significant bit represents the chunk section at the bottom of the chunk column (from y=0 to y=15).
+
  | The type of entity (same as in [[#Spawn Living Entity|Spawn Living Entity]]).
 
  |-
 
  |-
  | Heightmaps
+
  | X
  | [[NBT]]
+
  | Double
  | 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 at 9 bits per entry totaling 36 longs). 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.
+
|
  |-  
+
|-
  | Biomes length
+
| Y
  | Optional VarInt
+
| Double
  | Size of the following array. Not present if full chunk is false.
+
|
 +
|-
 +
| Z
 +
| Double
 +
  |  
 +
  |-
 +
  | Pitch
 +
  | Angle
 +
  | To get the real pitch, you must divide this by (256.0F / 360.0F)
 
  |-
 
  |-
  | Biomes
+
  | Yaw
  | Optional array of VarInt
+
  | Angle
  | <s>1024 biome IDs, ordered by x then z then y, in 4&times;4&times;4 blocks.</s>Possibly something else.  Not present if full chunk is false.
+
  | To get the real yaw, you must divide this by (256.0F / 360.0F)
  |-  
+
  |- {{added}}
  | Size
+
  | Head Yaw
| VarInt
+
  | Angle
  | Size of Data in bytes
 
 
  |-
 
  |-
 
  | Data
 
  | Data
  | Byte array
+
  | Int
  | See [[Chunk Format#Data structure|data structure]] in Chunk Format
+
  | Meaning dependent on the value of the Type field, see [[Object Data]] for details.
 +
|-
 +
| Velocity X
 +
| Short
 +
|rowspan="3"| Same units as [[#Entity Velocity|Entity Velocity]].  Always sent, but only used when Data is greater than 0 (except for some entities which always ignore it; see [[Object Data]] for details).
 +
|-
 +
| Velocity Y
 +
| Short
 
  |-
 
  |-
  | Number of block entities
+
  | Velocity Z
 +
| Short
 +
|}
 +
 
 +
 
 +
==== Acknowledge Block Changes ====
 +
 
 +
{| class="wikitable" {{Added}}
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 +
|-
 +
|rowspan="4"| 0x05
 +
|rowspan="4"| Play
 +
|rowspan="4"| Client
 +
| Sequence ID
 
  | VarInt
 
  | VarInt
  | Number of elements in the following array
+
  | Represents the sequence to acknowledge, this is used for properly syncing block changes to the client after interactions.
 
  |-
 
  |-
| Block entities
 
| Array of [[NBT|NBT Tag]]
 
| All block entities in the chunk.  Use the x, y, and z tags in the NBT to determine their positions.
 
 
  |}
 
  |}
  
Note that the Notchian client requires an [[#Update View Position|Update View Position]] packet when it crosses a chunk border, otherwise it'll only display render distance + 2 chunks around the chunk it spawned in.
+
==== Block Action ====
  
The compacted array format has been adjusted so that individual entries no longer span across multiple longs, affecting the main data array and heightmaps.
+
This packet is used for a number of actions and animations performed by blocks, usually non-persistent.  The client ignores the provided block type and instead uses the block state in their world.
  
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>
+
See [[Block Actions]] for a list of values.
  
<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>
+
{{Warning2|This packet uses a block ID, not a block state.}}
<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>
 
  
 +
{| class="wikitable"
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 +
|-
 +
|rowspan="5"| 0x0B
 +
|rowspan="5"| Play
 +
|rowspan="5"| Client
 +
| Location
 +
| Position
 +
| Block coordinates.
 +
|-
 +
| Action ID (Byte 1)
 +
| Unsigned Byte
 +
| Varies depending on block — see [[Block Actions]].
 +
|-
 +
| Action Param (Byte 2)
 +
| Unsigned Byte
 +
| Varies depending on block — see [[Block Actions]].
 +
|-
 +
| Block Type
 +
| VarInt
 +
| The block type ID for the block.  This must match the block at the given coordinates.
 +
|- {{added}}
 +
| Sequence
 +
| VarInt
 +
|}
  
  
==== Update Light ====
+
==== Named Sound Effect ====
 +
{{See also|#Sound Effect}}
  
Updates light levels for a chunk.
+
Used to play a sound effect on the client. Custom sounds may be added by resource packs.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 213: Line 303:
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  !colspan="2"| Field Name
+
  ! Field Name
  !colspan="2"| Field Type
+
  ! Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="11"| 0x23
+
  |rowspan="8"| {{change|0x19|0x16}}
  |rowspan="11"| Play
+
  |rowspan="8"| Play
  |rowspan="11"| Client
+
  |rowspan="8"| Client
  |colspan="2"| Chunk X
+
  | Sound Name
  |colspan="2"| VarInt
+
  | Identifier
  | Chunk coordinate (block coordinate divided by 16, rounded down)
+
  | All sound effect names as of 1.16.5 can be seen [https://pokechu22.github.io/Burger/1.16.5.html#sounds here].
 
  |-
 
  |-
  |colspan="2"| Chunk Z
+
  | Sound Category
  |colspan="2"| VarInt
+
| VarInt Enum
  | Chunk coordinate (block coordinate divided by 16, rounded down)  
+
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories]).
 +
|-
 +
| Effect Position X
 +
| Int
 +
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
 +
|-
 +
| Effect Position Y
 +
| Int
 +
| Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
 +
|-
 +
| Effect Position Z
 +
| Int
 +
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
 +
|-
 +
| Volume
 +
  | Float
 +
| 1 is 100%, can be more.
 +
|-
 +
| Pitch
 +
| Float
 +
| Float between 0.5 and 2.0 by Notchian clients.
 +
|- {{added}}
 +
| Seed
 +
| long
 +
| Seed used to pick sound varient.
 +
  |}
 +
 
 +
==== {{change|Chat Message|Player Chat Msg}} (clientbound) ====
 +
 
 +
Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options.  See [[Chat#Processing chat|processing chat]] for more info about these positions.
 +
 
 +
{| class="wikitable"
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 
  |-
 
  |-
  |colspan="2"| Trust Edges
+
  |rowspan="10"| {{change|0x0F|0x2F}}
  |colspan="2"| Boolean
+
  |rowspan="10"| Play
  | If edges should be trusted for light updates.
+
|rowspan="10"| Client
 +
| JSON Data
 +
| [[Chat]]
 +
  | Limited to 262144 bytes.
 
  |-
 
  |-
  |colspan="2"| ? (Changes unknown)
+
  | {{change|Position|Type}}
  |colspan="2"| {{change|VarInt|VarLong}}
+
  | {{change|Byte|VarInt}}
  | ? (Changes unknown)
+
  | 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar), 3: say command, 4: msg command, 5: team msg command, 6: emote command, 7: tellraw command
 
  |-
 
  |-
  |colspan="2"| ? (Changes unknown)
+
  | Sender
  |colspan="2"| {{change|VarInt|VarLong}}
+
| UUID
  | ? (Changes unknown)
+
| Used by the Notchian client for the disableChat launch option. Setting both longs to 0 will always display the message regardless of the setting.
 +
|- {{added}}
 +
| Display Name
 +
| Component
 +
|
 +
|- {{added}}
 +
| Has Team Display Name
 +
| Boolean
 +
| Used in /teammsg
 +
|- {{added}}
 +
| Team Display Name
 +
| Component
 +
| Used in /teammsg
 +
|- {{added}}
 +
| Timestamp
 +
| Long
 +
| Used to check that the message was received within 2 minutes of it being sent.
 +
|- {{added}}
 +
| Salt
 +
| Long
 +
  | Cryptography, TODO:
 +
|- {{added}}
 +
| Signature Length
 +
| VarInt
 +
| Array Length
 +
|- {{added}}
 +
  | Message Signature
 +
| Bytes
 +
| Cryptography, TODO:
 +
|}
 +
 
 +
==== System Chat Message (clientbound) ====
 +
 
 +
Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options.  See [[Chat#Processing chat|processing chat]] for more info about these positions.
 +
 
 +
{| class="wikitable"
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 
  |-
 
  |-
  |colspan="2"| ? (Changes unknown)
+
  |rowspan="2"| 0x5C
  |colspan="2"| {{change|VarInt|VarLong}}
+
  |rowspan="2"| Play
  | ? (Changes unknown)
+
|rowspan="2"| Client
 +
| JSON Data
 +
| [[Chat]]
 +
  | Limited to 262144 bytes.
 
  |-
 
  |-
  |colspan="2"| ? (Changes unknown)
+
  | Type
  |colspan="2"| {{change|VarInt|VarLong}}
+
| VarInt
  | ? (Changes unknown)
+
| 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar), 3: say command, 4: msg command, 5: team msg command, 6: emote command, 7: tellraw command
 +
  |}
 +
 
 +
==== Entity Sound Effect ====
 +
 
 +
Plays a sound effect from an entity.
 +
 
 +
{| class="wikitable"
 +
  ! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 
  |-
 
  |-
  |rowspan="2"| Sky Light arrays
+
  |rowspan="6"| {{change|0x5C|0x59}}
  | Length
+
  |rowspan="6"| Play
  |rowspan="2"| Array
+
  |rowspan="6"| Client
 +
| Sound ID
 
  | VarInt
 
  | VarInt
  | Length of the following array in bytes (always 2048)
+
  | ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.16.5.html#sounds events] as of 1.16.5).
 
  |-
 
  |-
  | Sky Light array
+
  | Sound Category
  | Array of 2048 bytes
+
  | VarInt Enum
  | 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.
+
  | The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories]).
 
  |-
 
  |-
  |rowspan="2"| Block Light arrays
+
  | Entity ID
| Length
 
|rowspan="2"| Array
 
 
  | VarInt
 
  | VarInt
  | Length of the following array in bytes (always 2048)
+
  |
 
  |-
 
  |-
  | Block Light array
+
  | Volume
  | Array of 2048 bytes
+
  | Float
  | There is 1 array for each bit set to true in the block light mask, starting with the lowest valueHalf a byte per light value.
+
  | 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients.
 +
|-
 +
| Pitch
 +
| Float
 +
| Float between 0.5 and 2.0 by Notchian clients.
 +
|- {{added}}
 +
  | Seed
 +
| long
 +
| Seed used to pick sound varient.
 
  |}
 
  |}
  
  
 +
==== Sound Effect ====
  
 +
This packet is used to play a number of hardcoded sound events. For custom sounds, use [[#Named Sound Effect|Named Sound Effect]].
  
==== Map Data ====
+
{{Warning|Numeric sound effect IDs are liable to change between versions}}
 
 
Updates a rectangular area on a {{Minecraft Wiki|map}} item.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 280: Line 474:
 
  ! State
 
  ! State
 
  ! Bound To
 
  ! Bound To
  !colspan="2"| Field Name
+
  ! Field Name
  !colspan="2"| Field Type
+
  ! Field Type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="18"| 0x25
+
  |rowspan="8"| {{change|0x5D|0x5A}}
  |rowspan="18"| Play
+
  |rowspan="8"| Play
  |rowspan="18"| Client
+
  |rowspan="8"| Client
  |colspan="2"| Map ID
+
  | Sound ID
  |colspan="2"| VarInt
+
| VarInt
  | Map ID of the map being modified
+
| ID of hardcoded sound event ([https://pokechu22.github.io/Burger/1.16.5.html#sounds events] as of 1.16.5).
 +
  |-
 +
| Sound Category
 +
| VarInt Enum
 +
| The category that this sound will be played from ([https://gist.github.com/konwboj/7c0c380d3923443e9d55 current categories]).
 +
|-
 +
  | Effect Position X
 +
| Int
 +
| Effect X multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
 
  |-
 
  |-
  |colspan="2"| Scale
+
  | Effect Position Y
  |colspan="2"| Byte
+
  | Int
  | From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)
+
  | Effect Y multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
|- {{removed}}
 
|colspan="2"| Tracking Position
 
|colspan="2"| Boolean
 
| Specifies whether player and item frame icons are shown
 
 
  |-
 
  |-
  |colspan="2"| Locked
+
  | Effect Position Z
  |colspan="2"| Boolean
+
| Int
  | True if the map has been locked in a cartography table
+
| Effect Z multiplied by 8 ([[Data types#Fixed-point numbers|fixed-point number]] with only 3 bits dedicated to the fractional part).
  |-  
+
|-
 +
  | Volume
 +
| Float
 +
  | 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients.
 +
  |-
 +
| Pitch
 +
| Float
 +
| Float between 0.5 and 2.0 by Notchian clients.
 
  |- {{added}}
 
  |- {{added}}
  |colspan="2"| Tracking Position
+
  | Seed
  |colspan="2"| Boolean
+
| long
  | Specifies whether player and item frame icons are shown
+
| Seed used to pick sound varient.
 +
  |}
 +
 
 +
==== Entity Effect ====
 +
 
 +
{| class="wikitable"
 +
  ! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 
  |-
 
  |-
  |colspan="2"| Icon Count
+
  |rowspan="7"| {{change|0x65|0x62}}
  |colspan="2"| VarInt
+
  |rowspan="7"| Play
  | Number of elements in the following array. {{change||Only present if "Tracking Position" is true.}}
+
|rowspan="7"| Client
 +
  | Entity ID
 +
| VarInt
 +
|  
 
  |-
 
  |-
  |rowspan="6"| Icon
+
  | Effect ID
  | Type
+
  | VarInt
  |rowspan="6"| Array
+
  | See {{Minecraft Wiki|Status effect#Effect IDs|this table}}.
| VarInt enum
 
| See below
 
 
  |-
 
  |-
  | X
+
  | Amplifier
 
  | Byte
 
  | Byte
  | Map coordinates: -128 for furthest left, +127 for furthest right
+
  | Notchian client displays effect level as Amplifier + 1.
 
  |-
 
  |-
  | Z
+
  | Duration
  | Byte
+
  | VarInt
  | Map coordinates: -128 for highest, +127 for lowest
+
  | Duration in ticks.
 
  |-
 
  |-
  | Direction
+
  | Flags
 
  | Byte
 
  | Byte
  | 0-15
+
  | Bit field, see below.
 +
|- {{added}}
 +
| Has Factor Data
 +
| boolean
 +
| Used in DARKNESS effect
 +
|- {{added}}
 +
| Factor Codec
 +
| NBT Tag
 +
| See below
 +
|}
 +
 
 +
Within flags:
 +
 
 +
* 0x01: Is ambient - was the effect spawned from a beacon?  All beacon-generated effects are ambient.  Ambient effects use a different icon in the HUD (blue border rather than gray).  If all effects on an entity are ambient, the [[Entity_metadata#Living Entity|"Is potion effect ambient" living metadata field]] should be set to true.  Usually should not be enabled.
 +
* 0x02: Show particles - should all particles from this effect be hidden?  Effects with particles hidden are not included in the calculation of the effect color, and are not rendered on the HUD (but are still rendered within the inventory).  Usually should be enabled.
 +
* 0x04: Show icon - should the icon be displayed on the client?  Usually should be enabled.
 +
 
 +
Factor Data
 +
{| class="wikitable"
 +
!Name
 +
!Type
 +
!style="width: 250px;" colspan="2"| Notes
 
  |-
 
  |-
  | Has Display Name
+
  | padding_duration
  | Boolean
+
  | TAG_INT
 
  |
 
  |
 
  |-
 
  |-
  | Display Name
+
  | factor_target
  | Optional [[Chat]]
+
  | TAG_FLOAT
  | Only present if previous Boolean is true
+
  |  
|-
 
|colspan="2"| Columns
 
|colspan="2"| Unsigned Byte
 
| Number of columns updated
 
|-
 
|colspan="2"| Rows
 
|colspan="2"| Optional Byte
 
| Only if Columns is more than 0; number of rows updated
 
 
  |-
 
  |-
  |colspan="2"| X
+
  | factor_current
  |colspan="2"| Optional Byte
+
  | TAG_FLOAT
  | Only if Columns is more than 0; x offset of the westernmost column
+
  |  
 
  |-
 
  |-
  |colspan="2"| Z
+
  | effect_changed_timestamp
|colspan="2"| Optional Byte
+
  | TAG_INT
  | Only if Columns is more than 0; z offset of the northernmost row
 
 
  |-
 
  |-
  |colspan="2"| Length
+
  | factor_previous_frame
|colspan="2"| Optional VarInt
+
  | TAG_FLOAT
  | Only if Columns is more than 0; length of the following array
 
 
  |-
 
  |-
  |colspan="2"| Data
+
  | had_effect_last_tick
|colspan="2"| Optional Array of Unsigned Byte
+
  | TAG_BOOLEAN
  | Only if Columns is more than 0; see {{Minecraft Wiki|Map item format}}
 
 
  |}
 
  |}
  
For icons, a direction of 0 is a vertical icon and increments by 22.5&deg; (360/16).
+
=== Serverbound ===
  
Types are based off of rows and columns in <code>map_icons.png</code>:
+
==== Player Digging ====
 +
 
 +
Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius between the center of the block and 1.5 units from the player's feet (''not'' their eyes).
  
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Packet ID
 +
! State
 +
! Bound To
 +
! Field Name
 +
! Field Type
 +
! Notes
 +
|-
 +
|rowspan="4"| 0x1A
 +
|rowspan="4"| Play
 +
|rowspan="4"| Server
 +
| Status
 +
| VarInt Enum
 +
| The action the player is taking against the block (see below).
 
  |-
 
  |-
  ! Icon type
+
| Location
  ! Result
+
| Position
 +
| Block position.
 +
|-
 +
| Face
 +
| Byte Enum
 +
| The face being hit (see below).
 +
|- {{added}}
 +
| Sequence
 +
| VarInt
 +
|}
 +
 
 +
Status can be one of seven values:
 +
 
 +
{| class="wikitable"
 +
! Value
 +
  ! Meaning
 +
  ! Notes
 
  |-
 
  |-
 
  | 0
 
  | 0
  | White arrow (players)
+
  | Started digging
 +
|
 
  |-
 
  |-
 
  | 1
 
  | 1
  | Green arrow (item frames)
+
  | Cancelled digging
 +
| Sent when the player lets go of the Mine Block key (default: left click).
 
  |-
 
  |-
 
  | 2
 
  | 2
  | Red arrow
+
  | Finished digging
 +
| Sent when the client thinks it is finished.
 
  |-
 
  |-
 
  | 3
 
  | 3
  | Blue arrow
+
  | Drop item stack
 +
| Triggered by using the Drop Item key (default: Q) with the modifier to drop the entire selected stack (default: Control or Command, depending on OS). Location is always set to 0/0/0, Face is always set to -Y.
 
  |-
 
  |-
 
  | 4
 
  | 4
  | White cross
+
  | Drop item
 +
| Triggered by using the Drop Item key (default: Q). Location is always set to 0/0/0, Face is always set to -Y.
 
  |-
 
  |-
 
  | 5
 
  | 5
  | Red pointer
+
  | Shoot arrow / finish eating
 +
| Indicates that the currently held item should have its state updated such as eating food, pulling back bows, using buckets, etc. Location is always set to 0/0/0, Face is always set to -Y.
 
  |-
 
  |-
 
  | 6
 
  | 6
  | White circle (off-map players)
+
  | Swap item in hand
 +
| Used to swap or assign an item to the second hand. Location is always set to 0/0/0, Face is always set to -Y.
 +
|}
 +
 
 +
The Face field can be one of the following values, representing the face being hit:
 +
 
 +
{| class="wikitable"
 
  |-
 
  |-
  | 7
+
  ! Value
  | Small white circle (far-off-map players)
+
  ! Offset
 +
! Face
 
  |-
 
  |-
  | 8
+
  | 0
  | Mansion
+
  | -Y
 +
| Bottom
 
  |-
 
  |-
  | 9
+
  | 1
  | Temple
+
  | +Y
 +
| Top
 
  |-
 
  |-
  | 10
+
  | 2
  | White Banner
+
  | -Z
 +
| North
 
  |-
 
  |-
  | 11
+
  | 3
  | Orange Banner
+
  | +Z
 +
| South
 
  |-
 
  |-
  | 12
+
  | 4
  | Magenta Banner
+
  | -X
 +
| West
 
  |-
 
  |-
  | 13
+
  | 5
  | Light Blue Banner
+
  | +X
  |-
+
  | East
| 14
 
| Yellow Banner
 
|-
 
| 15
 
| Lime Banner
 
|-
 
| 16
 
| Pink Banner
 
|-
 
| 17
 
| Gray Banner
 
|-
 
| 18
 
| Light Gray Banner
 
|-
 
| 19
 
| Cyan Banner
 
|-
 
| 20
 
| Purple Banner
 
|-
 
| 21
 
| Blue Banner
 
|-
 
| 22
 
| Brown Banner
 
|-
 
| 23
 
| Green Banner
 
|-
 
| 24
 
| Red Banner
 
|-
 
| 25
 
| Black Banner
 
|-
 
| 26
 
| Treasure marker
 
 
  |}
 
  |}
  
 +
==== Set Beacon Effect ====
  
 
+
Changes the effect of the current beacon.
==== Resource Pack Send ====
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 466: Line 704:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="3"| 0x38
+
  |rowspan="5"| 0x24
  |rowspan="3"| Play
+
  |rowspan="5"| Play
  |rowspan="3"| Client
+
  |rowspan="5"| Server
  | URL
+
  |- {{added}}
  | String (32767)
+
  | Primary Effect Present
  | The URL to the resource pack.
+
  | Boolean
 
  |-
 
  |-
  | Hash
+
  | Primary Effect
  | String (40)
+
  | VarInt
  | A 40 character hexadecimal and lowercase [[wikipedia:SHA-1|SHA-1]] hash of the resource pack file. (must be lower case in order to work)<br />If it's not a 40 character hexadecimal string, the client will not use it for hash verification and likely waste bandwidth — but it will still treat it as a unique id
+
  | A [https://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message).
  |- {{Added}}
+
  |- {{added}}
  | Forced
+
  | Secondary Effect Present
 
  | Boolean
 
  | Boolean
  | The notchian client will be forced to use the ressource pack from the server. If they decline they will be kicked from the server.
+
  |  
 +
|-
 +
| Secondary Effect
 +
| VarInt
 +
| A [https://minecraft.gamepedia.com/Data_values#Potions Potion ID]. (Was a full Integer for the plugin message).
 
  |}
 
  |}
  
 +
==== Use Item ====
  
=== Serverbound ===
+
Sent when pressing the Use Item key (default: right click) with an item in hand.
 
 
No changes so far.
 
 
 
== 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"
 
{| class="wikitable"
Line 507: Line 736:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="4"| 0x00
+
  |rowspan="2"| 0x2F
  |rowspan="4"| Handshaking
+
  |rowspan="2"| Play
  |rowspan="4"| Server
+
  |rowspan="2"| Server
  | Protocol Version
+
  | Hand
 +
| VarInt Enum
 +
| Hand used for the animation. 0: main hand, 1: off hand.
 +
|- {{added}}
 +
| Sequence
 
  | VarInt
 
  | VarInt
| See [[protocol version numbers]] (currently {{change|754|1073741831}})
 
|-
 
| 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 ==
 
== Status ==

Latest revision as of 01:44, 6 May 2022

This page documents the changes from the last stable Minecraft release (currently 1.18.2, protocol 758) to the current pre-release (currently 22w16b, protocol Snapshot 81). 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

Packet ID shifts have not been included.

ID Packet name Documentation
Play clientbound
0x02 Spawn Living Entity Current
0x03 Spawn Painting Current
0x05 Sculk Vibration Signal Current
0x05 Acknowledge Block Changes Pre
0x08 Acknowledge Player Digging Current
0x5C System Message Pre
Play serverbound
Handshaking serverbound

New/modified data types

No changes so far.

Entity Metadata

Goat

The base class.

Index Type Meaning Default
0 Boolean Is Screaming Goat false
1 Boolean Has Left Horn true
2 Boolean Has Right Horn true

Painting

The base class.

Index Type Meaning Default
0 VarInt PaintingVariant 0

Player

The base class.

Index Type Meaning Default
0 Float Additional Hearts 0.0
1 VarInt Score 0
2 Byte The Displayed Skin Parts bit mask that is sent in Client Settings 0
Bit mask Meaning
0x01 Cape enabled
0x02 Jacket enabled
0x04 Left sleeve enabled
0x08 Right sleeve enabled
0x10 Left pants leg enabled
0x20 Right pants leg enabled
0x40 Hat enabled
0x80 Unused
3 Byte Main hand (0 : Left, 1 : Right) 1
4 NBT Left shoulder entity data (for occupying parrot) Empty
5 NBT Right shoulder entity data (for occupying parrot) Empty
6 Global Position Optional Last Death Location (used for respawn compass) Empty


Entity

No changes so far.

Block Actions

No changes so far.

Inventories

No changes so far.

Plugin Channels

No changes so far.

Play

Clientbound

Spawn Entity

Sent by the server when a vehicle or other non-living entity is created.

Packet ID State Bound To Field Name Field Type Notes
0x00 Play Client Entity ID VarInt Entity ID.
Object UUID UUID
Type VarInt The type of entity (same as in Spawn Living Entity).
X Double
Y Double
Z Double
Pitch Angle To get the real pitch, you must divide this by (256.0F / 360.0F)
Yaw Angle To get the real yaw, you must divide this by (256.0F / 360.0F)
Head Yaw Angle
Data Int Meaning dependent on the value of the Type field, see Object Data for details.
Velocity X Short Same units as Entity Velocity. Always sent, but only used when Data is greater than 0 (except for some entities which always ignore it; see Object Data for details).
Velocity Y Short
Velocity Z Short


Acknowledge Block Changes

Packet ID State Bound To Field Name Field Type Notes
0x05 Play Client Sequence ID VarInt Represents the sequence to acknowledge, this is used for properly syncing block changes to the client after interactions.

Block Action

This packet is used for a number of actions and animations performed by blocks, usually non-persistent. The client ignores the provided block type and instead uses the block state in their world.

See Block Actions for a list of values.

Warning.png This packet uses a block ID, not a block state.

Packet ID State Bound To Field Name Field Type Notes
0x0B Play Client Location Position Block coordinates.
Action ID (Byte 1) Unsigned Byte Varies depending on block — see Block Actions.
Action Param (Byte 2) Unsigned Byte Varies depending on block — see Block Actions.
Block Type VarInt The block type ID for the block. This must match the block at the given coordinates.
Sequence VarInt


Named Sound Effect

See also: #Sound Effect

Used to play a sound effect on the client. Custom sounds may be added by resource packs.

Packet ID State Bound To Field Name Field Type Notes
0x19 0x16 Play Client Sound Name Identifier All sound effect names as of 1.16.5 can be seen here.
Sound Category VarInt Enum The category that this sound will be played from (current categories).
Effect Position X Int Effect X multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Effect Position Y Int Effect Y multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Effect Position Z Int Effect Z multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Volume Float 1 is 100%, can be more.
Pitch Float Float between 0.5 and 2.0 by Notchian clients.
Seed long Seed used to pick sound varient.

Chat Message Player Chat Msg (clientbound)

Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options. See processing chat for more info about these positions.

Packet ID State Bound To Field Name Field Type Notes
0x0F 0x2F Play Client JSON Data Chat Limited to 262144 bytes.
Position Type Byte VarInt 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar), 3: say command, 4: msg command, 5: team msg command, 6: emote command, 7: tellraw command
Sender UUID Used by the Notchian client for the disableChat launch option. Setting both longs to 0 will always display the message regardless of the setting.
Display Name Component
Has Team Display Name Boolean Used in /teammsg
Team Display Name Component Used in /teammsg
Timestamp Long Used to check that the message was received within 2 minutes of it being sent.
Salt Long Cryptography, TODO:
Signature Length VarInt Array Length
Message Signature Bytes Cryptography, TODO:

System Chat Message (clientbound)

Identifying the difference between Chat/System Message is important as it helps respect the user's chat visibility options. See processing chat for more info about these positions.

Packet ID State Bound To Field Name Field Type Notes
0x5C Play Client JSON Data Chat Limited to 262144 bytes.
Type VarInt 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar), 3: say command, 4: msg command, 5: team msg command, 6: emote command, 7: tellraw command

Entity Sound Effect

Plays a sound effect from an entity.

Packet ID State Bound To Field Name Field Type Notes
0x5C 0x59 Play Client Sound ID VarInt ID of hardcoded sound event (events as of 1.16.5).
Sound Category VarInt Enum The category that this sound will be played from (current categories).
Entity ID VarInt
Volume Float 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients.
Pitch Float Float between 0.5 and 2.0 by Notchian clients.
Seed long Seed used to pick sound varient.


Sound Effect

This packet is used to play a number of hardcoded sound events. For custom sounds, use Named Sound Effect.

Warning.png Numeric sound effect IDs are liable to change between versions

Packet ID State Bound To Field Name Field Type Notes
0x5D 0x5A Play Client Sound ID VarInt ID of hardcoded sound event (events as of 1.16.5).
Sound Category VarInt Enum The category that this sound will be played from (current categories).
Effect Position X Int Effect X multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Effect Position Y Int Effect Y multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Effect Position Z Int Effect Z multiplied by 8 (fixed-point number with only 3 bits dedicated to the fractional part).
Volume Float 1.0 is 100%, capped between 0.0 and 1.0 by Notchian clients.
Pitch Float Float between 0.5 and 2.0 by Notchian clients.
Seed long Seed used to pick sound varient.

Entity Effect

Packet ID State Bound To Field Name Field Type Notes
0x65 0x62 Play Client Entity ID VarInt
Effect ID VarInt See this table.
Amplifier Byte Notchian client displays effect level as Amplifier + 1.
Duration VarInt Duration in ticks.
Flags Byte Bit field, see below.
Has Factor Data boolean Used in DARKNESS effect
Factor Codec NBT Tag See below

Within flags:

  • 0x01: Is ambient - was the effect spawned from a beacon? All beacon-generated effects are ambient. Ambient effects use a different icon in the HUD (blue border rather than gray). If all effects on an entity are ambient, the "Is potion effect ambient" living metadata field should be set to true. Usually should not be enabled.
  • 0x02: Show particles - should all particles from this effect be hidden? Effects with particles hidden are not included in the calculation of the effect color, and are not rendered on the HUD (but are still rendered within the inventory). Usually should be enabled.
  • 0x04: Show icon - should the icon be displayed on the client? Usually should be enabled.

Factor Data

Name Type Notes
padding_duration TAG_INT
factor_target TAG_FLOAT
factor_current TAG_FLOAT
effect_changed_timestamp TAG_INT
factor_previous_frame TAG_FLOAT
had_effect_last_tick TAG_BOOLEAN

Serverbound

Player Digging

Sent when the player mines a block. A Notchian server only accepts digging packets with coordinates within a 6-unit radius between the center of the block and 1.5 units from the player's feet (not their eyes).

Packet ID State Bound To Field Name Field Type Notes
0x1A Play Server Status VarInt Enum The action the player is taking against the block (see below).
Location Position Block position.
Face Byte Enum The face being hit (see below).
Sequence VarInt

Status can be one of seven values:

Value Meaning Notes
0 Started digging
1 Cancelled digging Sent when the player lets go of the Mine Block key (default: left click).
2 Finished digging Sent when the client thinks it is finished.
3 Drop item stack Triggered by using the Drop Item key (default: Q) with the modifier to drop the entire selected stack (default: Control or Command, depending on OS). Location is always set to 0/0/0, Face is always set to -Y.
4 Drop item Triggered by using the Drop Item key (default: Q). Location is always set to 0/0/0, Face is always set to -Y.
5 Shoot arrow / finish eating Indicates that the currently held item should have its state updated such as eating food, pulling back bows, using buckets, etc. Location is always set to 0/0/0, Face is always set to -Y.
6 Swap item in hand Used to swap or assign an item to the second hand. Location is always set to 0/0/0, Face is always set to -Y.

The Face field can be one of the following values, representing the face being hit:

Value Offset Face
0 -Y Bottom
1 +Y Top
2 -Z North
3 +Z South
4 -X West
5 +X East

Set Beacon Effect

Changes the effect of the current beacon.

Packet ID State Bound To Field Name Field Type Notes
0x24 Play Server
Primary Effect Present Boolean
Primary Effect VarInt A Potion ID. (Was a full Integer for the plugin message).
Secondary Effect Present Boolean
Secondary Effect VarInt A Potion ID. (Was a full Integer for the plugin message).

Use Item

Sent when pressing the Use Item key (default: right click) with an item in hand.

Packet ID State Bound To Field Name Field Type Notes
0x2F Play Server Hand VarInt Enum Hand used for the animation. 0: main hand, 1: off hand.
Sequence VarInt


Status

Clientbound

No changes so far.

Serverbound

No changes so far.

Login

Clientbound

No changes so far.

Serverbound

No changes so far.