Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(→‎Serverbound: Merge play serverbound)
(→‎Clientbound: Remove merged content)
Line 164: Line 164:
 
=== Clientbound ===
 
=== Clientbound ===
  
==== Spawn Painting ====
+
No changes so far.
 
 
This packet shows location, name, and type of painting.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="5"| 0x04
 
|rowspan="5"| Play
 
|rowspan="5"| Client
 
| Entity ID
 
| VarInt
 
|
 
|-
 
| Entity UUID
 
| UUID
 
|
 
|-
 
| Motive
 
| {{Change|String (13)|VarInt}}
 
| {{Change|Name of the painting. Max length 13|Panting's ID, see below}}
 
|-
 
| Location
 
| Position
 
| Center coordinates (see below)
 
|-
 
| Direction
 
| Byte Enum
 
| Direction the painting faces (North = 2, South = 0, West = 1, East = 3)
 
|}
 
 
 
Calculating the center of an image: given a (width × height) grid of cells, with <code>(0, 0)</code> being the top left corner, the center is <code>(max(0, width / 2 - 1), height / 2)</code>. E.g. <code>(1, 0)</code> for a 2×1 painting, or <code>(1, 2)</code> for a 4×4 painting.
 
 
 
List of paintings by coordinates in <code>paintings_kristoffer_zetterstrand.png</code> (where x and y are in pixels from the top left and width and height are in pixels or 16ths of a block):
 
 
 
{| class="wikitable"
 
! Name
 
!{{Added}}| ID
 
! x
 
! y
 
! width
 
! height
 
|-
 
| {{Change|<code>Kebab</code>|<code>minecraft:kebab</code>}}
 
| 0
 
| 0
 
| 0
 
| 16
 
| 16
 
|-
 
| {{Change|<code>Aztec</code>|<code>minecraft:aztec</code>}}
 
| 1
 
| 16
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Alban</code>|<code>minecraft:alban</code>}}
 
| 2
 
| 32
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Aztec2</code>|<code>minecraft:aztec2</code>}}
 
| 3
 
| 48
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Bomb</code>|<code>minecraft:bomb</code>}}
 
| 4
 
| 64
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Plant</code>|<code>minecraft:plant</code>}}
 
| 5
 
| 80
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Wasteland</code>|<code>minecraft:wasteland</code>}}
 
| 6
 
| 96
 
| 0
 
| 16
 
| 16
 
|-
 
| {{change|<code>Pool</code>|<code>minecraft:pool</code>}}
 
| 7
 
| 0
 
| 32
 
| 32
 
| 16
 
|-
 
| {{change|<code>Courbet</code>|<code>minecraft:courbet</code>}}
 
| 8
 
| 32
 
| 32
 
| 32
 
| 16
 
|-
 
| {{change|<code>Sea</code>|<code>minecraft:sea</code>}}
 
| 9
 
| 64
 
| 32
 
| 32
 
| 16
 
|-
 
| {{change|<code>Sunset</code>|<code>minecraft:sunset</code>}}
 
| 10
 
| 96
 
| 32
 
| 32
 
| 16
 
|-
 
| {{change|<code>Creebet</code>|<code>minecraft:creebet</code>}}
 
| 11
 
| 128
 
| 32
 
| 32
 
| 16
 
|-
 
| {{change|<code>Wanderer</code>|<code>minecraft:wanderer</code>}}
 
| 12
 
| 0
 
| 64
 
| 16
 
| 32
 
|-
 
| {{change|<code>Graham</code>|<code>minecraft:graham</code>}}
 
| 13
 
| 16
 
| 64
 
| 16
 
| 32
 
|-
 
| {{change|<code>Match</code>|<code>minecraft:match</code>}}
 
| 14
 
| 0
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>Bust</code>|<code>minecraft:bust</code>}}
 
| 15
 
| 32
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>Stage</code>|<code>minecraft:stage</code>}}
 
| 16
 
| 64
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>Void</code>|<code>minecraft:void</code>}}
 
| 17
 
| 96
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>SkullAndRoses</code>|<code>skull_and_roses</code>}}
 
| 18
 
| 128
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>Wither</code>|<code>minecraft:wither</code>}}
 
| 19
 
| 160
 
| 128
 
| 32
 
| 32
 
|-
 
| {{change|<code>Fighters</code>|<code>minecraft:fighters</code>}}
 
| 20
 
| 0
 
| 96
 
| 64
 
| 32
 
|-
 
| {{change|<code>Pointer</code>|<code>minecraft:pointer</code>}}
 
| 21
 
| 0
 
| 192
 
| 64
 
| 64
 
|-
 
| {{change|<code>Pigscene</code>|<code>minecraft:pigscene</code>}}
 
| 22
 
| 64
 
| 192
 
| 64
 
| 64
 
|-
 
| {{change|<code>BurningSkull</code>|<code>minecraft:burning_skull</code>}}
 
| 23
 
| 128
 
| 192
 
| 64
 
| 64
 
|-
 
| {{change|<code>Skeleton</code>|<code>minecraft:skeleton</code>}}
 
| 24
 
| 192
 
| 64
 
| 64
 
| 48
 
|-
 
| {{change|<code>DonkeyKong</code>|<code>minecraft:donkey_kong</code>}}
 
| 25
 
| 192
 
| 112
 
| 64
 
| 48
 
|}
 
 
 
The {{Minecraft Wiki|Painting#Canvases|Minecraft Wiki article on paintings}} also provides a list of painting names to the actual images.
 
 
 
==== Statistics ====
 
 
 
Sent as a response to [[#Client_Status|Client Status]] (id 1).
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
!colspan="2"| Field Type
 
! Notes
 
|-
 
|rowspan="5"| 0x07
 
|rowspan="5"| Play
 
|rowspan="5"| Client
 
|colspan="2"| Count
 
|colspan="2"| VarInt
 
| Number of elements in the following array
 
|-
 
|rowspan="4"| Statistic
 
|{{Removed}}| Name
 
|rowspan="4"| Array
 
|{{Removed}}| String (32767)
 
|{{Removed}}| [https://gist.github.com/Alvin-LB/8d0d13db00b3c00fd0e822a562025eff https://gist.github.com/Alvin-LB/8d0d13db00b3c00fd0e822a562025eff]
 
|- {{Added}}
 
| Category ID
 
| VarInt
 
| See below
 
|- {{Added}}
 
| Statistic ID
 
| VarInt
 
| See below
 
|-
 
| Value
 
| VarInt
 
| The amount to set it to
 
|}
 
 
 
Categories (these are namespaced, but with <code>:</code>. replaced with <code>.</code>):
 
 
 
{| class="wikitable"
 
! Name
 
! ID
 
! Registry
 
|-
 
| <code>minecraft.mined</code>
 
| 0
 
| Blocks
 
|-
 
| <code>minecraft.crafted</code>
 
| 1
 
| Items
 
|-
 
| <code>minecraft.used</code>
 
| 2
 
| Items
 
|-
 
| <code>minecraft.broken</code>
 
| 3
 
| Items
 
|-
 
| <code>minecraft.picked_up</code>
 
| 4
 
| Items
 
|-
 
| <code>minecraft.dropped</code>
 
| 5
 
| Items
 
|-
 
| <code>minecraft.killed</code>
 
| 6
 
| Entities
 
|-
 
| <code>minecraft.killed_by</code>
 
| 7
 
| Entities
 
|-
 
| <code>minecraft.custom</code>
 
| 8
 
| Custom
 
|}
 
 
 
Blocks, Items, and Entities use block (not block state), item, and entity ids.
 
 
 
Custom has the following (unit only matters for clients):
 
 
 
{| class="wikitable"
 
! Name
 
! ID
 
! Unit
 
|-
 
| <code>minecraft.leave_game</code>
 
| 0
 
| None
 
|-
 
| <code>minecraft.play_one_minute</code>
 
| 1
 
| Time
 
|-
 
| <code>minecraft.time_since_death</code>
 
| 2
 
| Time
 
|-
 
| <code>minecraft.sneak_Time</code>
 
| 3
 
| Time
 
|-
 
| <code>minecraft.walk_one_cm</code>
 
| 4
 
| Distance
 
|-
 
| <code>minecraft.crouch_one_cm</code>
 
| 5
 
| Distance
 
|-
 
| <code>minecraft.sprint_one_cm</code>
 
| 6
 
| Distance
 
|-
 
| <code>minecraft.swim_one_cm</code>
 
| 7
 
| Distance
 
|-
 
| <code>minecraft.fall_one_cm</code>
 
| 8
 
| Distance
 
|-
 
| <code>minecraft.climb_one_cm</code>
 
| 9
 
| Distance
 
|-
 
| <code>minecraft.fly_one_cm</code>
 
| 10
 
| Distance
 
|-
 
| <code>minecraft.dive_one_cm</code>
 
| 11
 
| Distance
 
|-
 
| <code>minecraft.minecart_one_cm</code>
 
| 12
 
| Distance
 
|-
 
| <code>minecraft.boat_one_cm</code>
 
| 13
 
| Distance
 
|-
 
| <code>minecraft.pig_one_cm</code>
 
| 14
 
| Distance
 
|-
 
| <code>minecraft.horse_one_cm</code>
 
| 15
 
| Distance
 
|-
 
| <code>minecraft.aviate_one_cm</code>
 
| 16
 
| Distance
 
|-
 
| <code>minecraft.jump</code>
 
| 17
 
| None
 
|-
 
| <code>minecraft.drop</code>
 
| 18
 
| None
 
|-
 
| <code>minecraft.damage_dealt</code>
 
| 19
 
| Damage
 
|-
 
| <code>minecraft.damage_taken</code>
 
| 20
 
| Damage
 
|-
 
| <code>minecraft.deaths</code>
 
| 21
 
| None
 
|-
 
| <code>minecraft.mob_kills</code>
 
| 22
 
| None
 
|-
 
| <code>minecraft.animals_bred</code>
 
| 23
 
| None
 
|-
 
| <code>minecraft.player_kills</code>
 
| 24
 
| None
 
|-
 
| <code>minecraft.fish_caught</code>
 
| 25
 
| None
 
|-
 
| <code>minecraft.talked_to_villager</code>
 
| 26
 
| None
 
|-
 
| <code>minecraft.traded_with_villager</code>
 
| 27
 
| None
 
|-
 
| <code>minecraft.eat_cake_slice</code>
 
| 28
 
| None
 
|-
 
| <code>minecraft.fill_cauldron</code>
 
| 29
 
| None
 
|-
 
| <code>minecraft.use_cauldron</code>
 
| 30
 
| None
 
|-
 
| <code>minecraft.clean_armor</code>
 
| 31
 
| None
 
|-
 
| <code>minecraft.clean_banner</code>
 
| 32
 
| None
 
|-
 
| <code>minecraft.interact_with_brewingstand</code>
 
| 33
 
| None
 
|-
 
| <code>minecraft.interact_with_beacon</code>
 
| 34
 
| None
 
|-
 
| <code>minecraft.inspect_dropper</code>
 
| 35
 
| None
 
|-
 
| <code>minecraft.inspect_hopper</code>
 
| 36
 
| None
 
|-
 
| <code>minecraft.inspect_dispenser</code>
 
| 37
 
| None
 
|-
 
| <code>minecraft.play_noteblock</code>
 
| 38
 
| None
 
|-
 
| <code>minecraft.tune_noteblock</code>
 
| 39
 
| None
 
|-
 
| <code>minecraft.pot_flower</code>
 
| 40
 
| None
 
|-
 
| <code>minecraft.trigger_trapped_chest</code>
 
| 41
 
| None
 
|-
 
| <code>minecraft.open_enderchest</code>
 
| 42
 
| None
 
|-
 
| <code>minecraft.enchant_item</code>
 
| 43
 
| None
 
|-
 
| <code>minecraft.play_record</code>
 
| 44
 
| None
 
|-
 
| <code>minecraft.interact_with_furnace</code>
 
| 45
 
| None
 
|-
 
| <code>minecraft.interact_with_crafting_table</code>
 
| 46
 
| None
 
|-
 
| <code>minecraft.open_chest</code>
 
| 47
 
| None
 
|-
 
| <code>minecraft.sleep_in_bed</code>
 
| 48
 
| None
 
|-
 
| <code>minecraft.open_shulker_box</code>
 
| 49
 
| None
 
|}
 
 
 
Units:
 
 
 
* None: just a normal number (formatted with 0 decimal places)
 
* Damage: value is 10 times the normal amount
 
* Distance: a distance in centimeters (hundredths of blocks)
 
* Time: a time span in ticks
 
 
 
==== Update Block Entity ====
 
 
 
Sets tile entity associated with the block at the given location.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="3"| 0x09
 
|rowspan="3"| Play
 
|rowspan="3"| Client
 
| Location
 
| Position
 
|
 
|-
 
| Action
 
| Unsigned Byte
 
| The type of update to perform, see below
 
|-
 
| NBT Data
 
| [[NBT|NBT Tag]]
 
| Data to set.  May be a TAG_END (0), in which case the block entity at the given location is removed (though this is not required since the client will remove the block entity automatically on chunk unload or block removal)
 
|}
 
 
 
''Action'' field:
 
 
 
* '''1''': Set data of a mob spawner (everything except for SpawnPotentials: current delay, min/max delay, mob to be spawned, spawn count, spawn range, etc.)
 
* '''2''': Set command block text (command and last execution status)
 
* '''3''': Set the level, primary, and secondary powers of a beacon
 
* '''4''': Set rotation and skin of mob head
 
* {{Change|'''5''': Set type of flower in flower pot}}
 
* {{Change||'''5''': Declare a conduit}}
 
* '''6''': Set base color and patterns on a banner
 
* '''7''': Set the data for a Structure tile entity
 
* '''8''': Set the destination for a end gateway
 
* '''9''': Set the text on a sign
 
* '''10''': Declare a shulker box, no data appears to be sent and the client seems to do fine without this packet. Perhaps it is a leftover from earlier versions?
 
* '''11''': {{change|Set the color of a bed|Declare a bed}}
 
 
 
==== Block Change ====
 
 
 
Fired whenever a block is changed within the render distance.
 
 
 
{{Warning2|Changing a block in a chunk that is not loaded is not a stable action.  The Notchian client currently uses a ''shared'' empty chunk which is modified for all block changes in unloaded chunks; while in 1.9 this chunk never renders in older versions the changed block will appear in all copies of the empty chunk.  Servers should avoid sending block changes in unloaded chunks and clients should ignore such packets.}}
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="2"| 0x0B
 
|rowspan="2"| Play
 
|rowspan="2"| Client
 
| Location
 
| Position
 
| Block Coordinates
 
|-
 
| Block ID
 
| VarInt
 
| The new block state ID for the block as given in the [[#global palette|global palette]].  {{change|(When reading data: <code>type {{=}} id >> 4</code>, <code>meta {{=}} id & 15</code>, when writing data: <code>id {{=}} type << 4 {{!}} (meta & 15)</code>)|See that section for more information.}}
 
|}
 
 
 
==== Boss Bar ====
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="14"| 0x0C
 
|rowspan="14"| Play
 
|rowspan="14"| Client
 
|colspan="2"| UUID
 
| UUID
 
| Unique ID for this bar
 
|-
 
|colspan="2"| Action
 
| VarInt Enum
 
| Determines the layout of the remaining packet
 
|-
 
! Action
 
! Field Name
 
!
 
!
 
|-
 
|rowspan="5"| 0: add
 
| Title
 
| [[Chat]]
 
|
 
|-
 
| Health
 
| Float
 
| From 0 to 1. Values greater than 1 do not crash a Notchian client, and start [https://i.johni0702.de/nA.png rendering part of a second health bar] at around 1.5.
 
|-
 
| Color
 
| VarInt Enum
 
| Color ID (see below)
 
|-
 
| Division
 
| VarInt Enum
 
| Type of division (see below)
 
|-
 
| Flags
 
| Unsigned Byte
 
| Bit mask. 0x1: should darken sky, 0x2: is dragon bar (used to play end music){{change||, 0x04: create fog (previously was also controlled by 0x02)}}
 
|-
 
| 1: remove
 
| ''no fields''
 
| ''no fields''
 
| Removes this boss bar
 
|-
 
| 2: update health
 
| Health
 
| Float
 
| as above
 
|-
 
| 3: update title
 
| Title
 
| [[Chat]]
 
|
 
|-
 
|rowspan="2"| 4: update style
 
| Color
 
| VarInt Enum
 
| Color ID (see below)
 
|-
 
| Dividers
 
| VarInt Enum
 
| as above
 
|-
 
| 5: update flags
 
| Flags
 
| Unsigned Byte
 
| as above
 
|-
 
|}
 
 
 
{| class="wikitable"
 
! ID
 
! Color
 
|-
 
| 0
 
| Pink
 
|-
 
| 1
 
| Blue
 
|-
 
| 2
 
| Red
 
|-
 
| 3
 
| Green
 
|-
 
| 4
 
| Yellow
 
|-
 
| 5
 
| Purple
 
|-
 
| 6
 
| White
 
|}
 
 
 
{| class="wikitable"
 
! ID
 
! Type of division
 
|-
 
| 0
 
| No division
 
|-
 
| 1
 
| 6 notches
 
|-
 
| 2
 
| 10 notches
 
|-
 
| 3
 
| 12 notches
 
|-
 
| 4
 
| 20 notches
 
|}
 
 
 
==== Multi Block Change ====
 
 
 
Fired whenever 2 or more blocks are changed within the same chunk on the same tick.
 
 
 
{{Warning|Changing blocks in chunks not loaded by the client is unsafe (see note on [[#Block Change|Block Change]]).}}
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
!colspan="2"| Field Type
 
! Notes
 
|-
 
|rowspan="6"| {{Change|0x10|0x0F}}
 
|rowspan="6"| Play
 
|rowspan="6"| Client
 
|colspan="2"| Chunk X
 
|colspan="2"| Int
 
| Chunk X coordinate
 
|-
 
|colspan="2"| Chunk Z
 
|colspan="2"| Int
 
| Chunk Z coordinate
 
|-
 
|colspan="2"| Record Count
 
|colspan="2"| VarInt
 
| Number of elements in the following array, i.e. the number of blocks affected
 
|-
 
|rowspan="3"| Record
 
| Horizontal Position
 
|rowspan="3"| Array
 
| Unsigned Byte
 
| The 4 most significant bits (<code>0xF0</code>) encode the X coordinate, relative to the chunk. The 4 least significant bits (<code>0x0F</code>) encode the Z coordinate, relative to the chunk.
 
|-
 
| Y Coordinate
 
| Unsigned Byte
 
| Y coordinate of the block
 
|-
 
| Block ID
 
| VarInt
 
| The new block state ID for the block as given in the [[#global palette|global palette]].  {{change|(When reading data: <code>type {{=}} id >> 4</code>, <code>meta {{=}} id & 15</code>, when writing data: <code>id {{=}} type << 4 {{!}} (meta & 15)</code>)|See that section for more information.}}
 
|}
 
 
 
To decode the position into a world position:
 
 
 
<syntaxhighlight lang="java">
 
worldX = (horizPos >> 4 & 15) + (chunkX * 16);
 
worldY = vertPos;
 
worldZ = (horizPos & 15) + (chunkZ * 16);
 
</syntaxhighlight>
 
 
 
 
 
==== Tab-Complete (clientbound) ====
 
 
 
Used to respond to the client's previous tab complete request.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
!colspan="2"|  Field Type
 
! Notes
 
|-
 
|rowspan="7"| {{Change|0x0E|0x10}}
 
|rowspan="7"| Play
 
|rowspan="7"| Client
 
|colspan="2" {{Added}}| Transaction Id
 
|colspan="2" {{Added}}| VarInt
 
|{{Added}}| This id should also be used in the tab completion response packet, or it will be ignored.
 
|- {{Added}}
 
|colspan="2"|  Start
 
|colspan="2"|  VarInt
 
| Start of the text to replace
 
|- {{Added}}
 
|colspan="2"|  Length
 
|colspan="2"|  VarInt
 
| Length of the text to replace
 
|-
 
|colspan="2"|  Count
 
|colspan="2"|  VarInt
 
| Number of elements in the following array
 
|-
 
|rowspan="3"| Matches
 
| Match
 
|rowspan="3"| Array
 
| String (32767)
 
| One eligible {{change|command|value to insert}}, note that each command is sent separately instead of in a single string, hence the need for Count.  {{change||Note that for instance this doesn't include a leading <code>/</code> on commands.}}
 
|-
 
|{{Added}}| Has tooltip
 
|{{Added}}| Boolean
 
|{{Added}}| True if the following is present
 
|-
 
|{{Added}}| Tooltip
 
|{{Added}}| Optional [[Chat]]
 
|{{Added}}| Tooltip to display; only present if previous Boolean is true
 
|}
 
 
 
==== Plugin Message (clientbound) ====
 
 
 
{{Main|Plugin channels}}
 
 
 
Mods and plugins can use this to send their data. Minecraft itself uses a number of [[plugin channel]]s. These internal channels are prefixed with <code>MC|</code>.
 
 
 
More documentation on this: [http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/ http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/]
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="2"| {{Change|0x18|0x19}}
 
|rowspan="2"| Play
 
|rowspan="2"| Client
 
| Channel
 
| {{Change|String (20)|Identifier}}
 
| Name of the [[plugin channel]] used to send the data
 
|-
 
| Data
 
| Byte Array
 
| Any data, depending on the channel. <code><nowiki>MC|</nowiki></code> channels are documented [[plugin channel|here]].  The length of this array must be inferred from the packet length.
 
|}
 
 
 
 
 
==== Named Sound Effect ====
 
{{See also|#Sound Effect}}
 
 
 
Used to play a sound effect on the client. Custom sounds may be added by resource packs.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="7"| {{Change|0x19|0x1A}}
 
|rowspan="7"| Play
 
|rowspan="7"| Client
 
| Sound Name
 
| {{Change|String (256)|Identifier}}
 
| All sound effect names as of 1.13-pre8 can be seen [http://pokechu22.github.io/Burger/1.13.html#sounds here].
 
|-
 
| 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)
 
|-
 
| 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
 
|}
 
==== Effect ====
 
 
 
Sent when a client is to play a sound or particle effect.
 
 
 
By default, the Minecraft client adjusts the volume of sound effects based on distance. The final boolean field is used to disable this, and instead the effect is played from 2 blocks away in the correct direction. Currently this is only used for effect 1023 (wither spawn) and effect 1028 (enderdragon death); it is ignored on other effects.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="4"| {{Change|0x21|0x23}}
 
|rowspan="4"| Play
 
|rowspan="4"| Client
 
| Effect ID
 
| Int
 
| The ID of the effect, see below
 
|-
 
| Location
 
| Position
 
| The location of the effect
 
|-
 
| Data
 
| Int
 
| Extra data for certain effects, see below
 
|-
 
| Disable Relative Volume
 
| Boolean
 
| See above
 
|}
 
 
 
Effect IDs:
 
 
 
{| class="wikitable"
 
! ID
 
! Name
 
! Data
 
|-
 
!colspan="3"| Sound
 
|-
 
| 1000
 
| Dispenser dispenses
 
|
 
|-
 
| 1001
 
| Dispenser fails to dispense
 
|
 
|-
 
| 1002
 
| Dispenser shoots
 
|
 
|-
 
| 1003
 
| Ender eye launched
 
|
 
|-
 
| 1004
 
| Firework shot
 
|
 
|-
 
| 1005
 
| Iron door opened
 
|
 
|-
 
| 1006
 
| Wooden door opened
 
|
 
|-
 
| 1007
 
| Wooden trapdoor opened
 
|
 
|-
 
| 1008
 
| Fence gate opened
 
|
 
|-
 
| 1009
 
| Fire extinguished
 
|
 
|-
 
| 1010
 
| Play record
 
| Special case, see below for more info
 
|-
 
| 1011
 
| Iron door closed
 
|
 
|-
 
| 1012
 
| Wooden door closed
 
|
 
|-
 
| 1013
 
| Wooden trapdoor closed
 
|
 
|-
 
| 1014
 
| Fence gate closed
 
|
 
|-
 
| 1015
 
| Ghast warns
 
|
 
|-
 
| 1016
 
| Ghast shoots
 
|
 
|-
 
| 1017
 
| Enderdragon shoots
 
|
 
|-
 
| 1018
 
| Blaze shoots
 
|
 
|-
 
| 1019
 
| Zombie attacks wood door
 
|
 
|-
 
| 1020
 
| Zombie attacks iron door
 
|
 
|-
 
| 1021
 
| Zombie breaks wood door
 
|
 
|-
 
| 1022
 
| Wither breaks block
 
|
 
|-
 
| 1023
 
| Wither spawned
 
|
 
|-
 
| 1024
 
| Wither shoots
 
|
 
|-
 
| 1025
 
| Bat takes off
 
|
 
|-
 
| 1026
 
| Zombie infects
 
|
 
|-
 
| 1027
 
| Zombie villager converted
 
|
 
|-
 
| 1028
 
| Ender dragon death
 
|
 
|-
 
| 1029
 
| Anvil destroyed
 
|
 
|-
 
| 1030
 
| Anvil used
 
|
 
|-
 
| 1031
 
| Anvil landed
 
|
 
|-
 
| 1032
 
| Portal travel
 
|
 
|-
 
| 1033
 
| Chorus flower grown
 
|
 
|-
 
| 1034
 
| Chorus flower died
 
|
 
|-
 
| 1035
 
| Brewing stand brewed
 
|
 
|-
 
| 1036
 
| Iron trapdoor opened
 
|
 
|-
 
| 1037
 
| Iron trapdoor closed
 
|
 
|-
 
!colspan="3"| Particle
 
|-
 
| 2000
 
| Spawns 10 smoke particles, e.g. from a fire
 
| Direction, see below
 
|-
 
| 2001
 
| Block break + block break sound
 
| | Block state, {{change|determined by <code>meta << 12 {{!}} block id</code> (this differs from normal global palette use)|as an index into the global palette}}
 
|-
 
| 2002
 
| Splash potion. Particle effect + glass break sound.
 
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]
 
|-
 
| 2003
 
| Eye of Ender entity break animation — particles and sound
 
|
 
|-
 
| 2004
 
| Mob spawn particle effect: smoke + flames
 
|
 
|-
 
| 2005
 
| Bonemeal particles
 
| How many particles to spawn (if set to 0, 15 are spawned)
 
|-
 
| 2006
 
| Dragon breath
 
|
 
|-
 
| 2007
 
| Instant splash potion
 
| [http://minecraft.gamepedia.com/Data_values#Potions Potion ID]
 
|-
 
| 3000
 
| End gateway spawn
 
|
 
|-
 
| 3001
 
| Enderdragon growl
 
|
 
|}
 
 
 
Smoke directions:
 
 
 
{| class="wikitable"
 
! ID
 
! Direction
 
|-
 
| 0
 
| South-East
 
|-
 
| 1
 
| South
 
|-
 
| 2
 
| South-West
 
|-
 
| 3
 
| East
 
|-
 
| 4
 
| (Up or middle ?)
 
|-
 
| 5
 
| West
 
|-
 
| 6
 
| North-East
 
|-
 
| 7
 
| North
 
|-
 
| 8
 
| North-West
 
|}
 
 
 
Play record: This is actually a special case within this packet. You can start/stop a record at a specific location. Use a valid {{Minecraft Wiki|Music Discs|Record ID}} to start a record (or overwrite a currently playing one), any other value will stop the record.  {{Change||While this packet still uses item IDs, item IDs have changed in 1.13.}}
 
 
 
==== Spawn Particle ====
 
 
 
Displays the named particle
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="11"| {{Change|0x22|0x24}}
 
|rowspan="11"| Play
 
|rowspan="11"| Client
 
| Particle ID
 
| Int
 
| The particle ID listed in [[#Particle]].
 
|-
 
| Long Distance
 
| Boolean
 
| If true, particle distance increases from 256 to 65536
 
|-
 
| X
 
| Float
 
| X position of the particle
 
|-
 
| Y
 
| Float
 
| Y position of the particle
 
|-
 
| Z
 
| Float
 
| Z position of the particle
 
|-
 
| Offset X
 
| Float
 
| This is added to the X position after being multiplied by random.nextGaussian()
 
|-
 
| Offset Y
 
| Float
 
| This is added to the Y position after being multiplied by random.nextGaussian()
 
|-
 
| Offset Z
 
| Float
 
| This is added to the Z position after being multiplied by random.nextGaussian()
 
|-
 
| Particle Data
 
| Float
 
| The data of each particle
 
|-
 
| Particle Count
 
| Int
 
| The number of particles to create
 
|-
 
| Data
 
| {{Change|Array of VarInt|Varies}}
 
| {{Change|Length depends on particle. "iconcrack" has length of 2, "blockcrack", "blockdust", and "fallingdust" have lengths of 1, the rest have 0.|The variable data listed in [[#Particle]]}}
 
|}
 
 
 
==== Map ====
 
 
 
Updates a rectangular area on a {{Minecraft Wiki|map}} item.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
!colspan="2"| Field Type
 
! Notes
 
|-
 
|rowspan="16"| {{Change|0x24|0x26}}
 
|rowspan="16"| Play
 
|rowspan="16"| Client
 
|colspan="2"| Item Damage
 
|colspan="2"| VarInt
 
| The damage value (map ID) of the map being modified
 
|-
 
|colspan="2"| Scale
 
|colspan="2"| Byte
 
| From 0 for a fully zoomed-in map (1 block per pixel) to 4 for a fully zoomed-out map (16 blocks per pixel)
 
|-
 
|colspan="2"| Tracking Position
 
|colspan="2"| Boolean
 
| Specifies whether the icons are shown
 
|-
 
|colspan="2"| Icon Count
 
|colspan="2"| VarInt
 
| Number of elements in the following array
 
|-
 
|rowspan="6"| Icon
 
| {{Change|Direction And Type|Type}}
 
|rowspan="6"| Array
 
| {{Change|Byte|VarInt enum}}
 
| {{Change|0xF0 {{=}} Type, 0x0F {{=}} Direction|Type (see below)}}
 
|-
 
| X
 
| Byte
 
|
 
|-
 
| Z
 
| Byte
 
|
 
|- {{Added}}
 
| Direction
 
| Byte
 
| 0-15
 
|- {{Added}}
 
| Has Display Name
 
| Boolean
 
|
 
|- {{Added}}
 
| Display Name
 
| Optional [[Chat]]
 
| Only present if previous Boolean is true
 
|-
 
|colspan="2"| Columns
 
|colspan="2"| 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
 
|colspan="2"| Optional Byte
 
| Only if Columns is more than 0; x offset of the westernmost column
 
|-
 
|colspan="2"| Z
 
|colspan="2"| Optional Byte
 
| Only if Columns is more than 0; z offset of the northernmost row
 
|-
 
|colspan="2"| Length
 
|colspan="2"| Optional VarInt
 
| Only if Columns is more than 0; length of the following array
 
|-
 
|colspan="2"| Data
 
|colspan="2"| Optional Array of Unsigned Byte
 
| 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).
 
 
 
Types are based off of rows and columns in <code>map_icons.png</code>:
 
 
 
{| class="wikitable"
 
|-
 
! Icon type
 
! Result
 
|-
 
| 0
 
| White arrow (players)
 
|-
 
| 1
 
| Green arrow (item frames)
 
|-
 
| 2
 
| Red arrow
 
|-
 
| 3
 
| Blue arrow
 
|-
 
| 4
 
| White cross
 
|-
 
| 5
 
| Red pointer
 
|-
 
| 6
 
| White circle (off-map players)
 
|-
 
| 7
 
| Small white circle (far-off-map players)
 
|-
 
| 8
 
| Mansion
 
|-
 
| 9
 
| Temple
 
|- {{Added}}
 
| 10
 
| White Banner
 
|- {{Added}}
 
| 11
 
| Orange Banner
 
|- {{Added}}
 
| 12
 
| Magenta Banner
 
|- {{Added}}
 
| 13
 
| Light Blue Banner
 
|- {{Added}}
 
| 14
 
| Yellow Banner
 
|- {{Added}}
 
| 15
 
| Lime Banner
 
|- {{Added}}
 
| 16
 
| Pink Banner
 
|- {{Added}}
 
| 17
 
| Gray Banner
 
|- {{Added}}
 
| 18
 
| Light Gray Banner
 
|- {{Added}}
 
| 19
 
| Cyan Banner
 
|- {{Added}}
 
| 20
 
| Purple Banner
 
|- {{Added}}
 
| 21
 
| Blue Banner
 
|- {{Added}}
 
| 22
 
| Brown Banner
 
|- {{Added}}
 
| 23
 
| Green Banner
 
|- {{Added}}
 
| 24
 
| Red Banner
 
|- {{Added}}
 
| 25
 
| Black Banner
 
|- {{Added}}
 
| 26
 
| Treasure marker
 
|}
 
 
 
==== Craft Recipe Response ====
 
 
 
Response to the serverbound packet ([[#Craft Recipe Request|Craft Recipe Request]]), with the same recipe ID.  Appears to be used to notify the UI.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="2"| {{Change|0x2B|0x2D}}
 
|rowspan="2"| Play
 
|rowspan="2"| Client
 
| Window ID
 
| Byte
 
|
 
|-
 
| Recipe
 
| {{Change|VarInt|Identifer}}
 
| A recipe ID
 
|}
 
 
 
==== Unlock Recipes ====
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="10"| {{Change|0x31|0x34}}
 
|rowspan="10"| Play
 
|rowspan="10"| Client
 
|-
 
| Action
 
| VarInt
 
| 0: init, 1: add, 2: remove
 
|-
 
| Crafting Recipe Book Open
 
| Boolean
 
| If true, then the crafting recipe book will be open when the player opens its inventory.
 
|-
 
| Crafting Recipe Book Filter Active
 
| Boolean
 
| If true, then the filtering option is active when the players opens its inventory.
 
|-
 
|{{Added}}| Smelting Recipe Book Open
 
| Boolean
 
| If true, then the smelting recipe book will be open when the player opens its inventory.
 
|-
 
|{{Added}}| Smelting Recipe Book Filter Active
 
| Boolean
 
| If true, then the filtering option is active when the players opens its inventory.
 
|-
 
| Array size 1
 
| VarInt
 
| Number of elements in the following array
 
|-
 
| Recipe IDs
 
| Array of {{Change|VarInt|Identifier}}
 
|
 
|-
 
| Array size 2
 
| Optional VarInt
 
| Number of elements in the following array, only present if mode is 0 (init)
 
|-
 
| Recipe IDs
 
| Optional Array of {{Change|VarInt|Identifier}}, only present if mode is 0 (init)
 
|
 
|}
 
Action:
 
* 0 (init) = All the recipes in the list 2 will added to the recipe book. All the recipes in list 1 will be tagged as displayed, recipes that aren't tagged will be shown in the notification. VERIFY LIST ORDER?
 
* 1 (add) = All the recipes in the list are added and their icon will be shown in the notification.
 
* 2 (remove) = Remove all the recipes in the list. This allows them to re-displayed when they are readded.
 
 
 
==== Scoreboard Objective ====
 
 
 
This is sent to the client when it should create a new {{Minecraft Wiki|scoreboard}} objective or remove one.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
! Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="4"| {{Change|0x42|0x45}}
 
|rowspan="4"| Play
 
|rowspan="4"| Client
 
| Objective Name
 
| String (16)
 
| An unique name for the objective
 
|-
 
| Mode
 
| Byte
 
| 0 to create the scoreboard. 1 to remove the scoreboard. 2 to update the display text.
 
|-
 
| Objective Value
 
| Optional {{Change|String (32)|Chat}}
 
| Only if mode is 0 or 2. The text to be displayed for the score
 
|-
 
| Type
 
| Optional {{change|String|VarInt Enum}}
 
| Only if mode is 0 or 2. {{change|“integer” or “hearts”|0 = "integer", 1 = "hearts"}}
 
|}
 
 
 
==== Teams ====
 
 
 
Creates and updates teams.
 
 
 
{| class="wikitable"
 
! Packet ID
 
! State
 
! Bound To
 
!colspan="2"| Field Name
 
! Field Type
 
! Notes
 
|-
 
|rowspan="27"| {{Change|0x44|0x47}}
 
|rowspan="27"| Play
 
|rowspan="27"| Client
 
|colspan="2"| Team Name
 
| String (16)
 
| A unique name for the team. (Shared with scoreboard).
 
|-
 
|colspan="2"| Mode
 
| Byte
 
| Determines the layout of the remaining packet
 
|-
 
|rowspan="11"| 0: create team
 
| Team Display Name
 
| {{Change|String (32)|Chat}}
 
|
 
|- {{Removed}}
 
| Team Prefix
 
| String (16)
 
| Displayed before the names of players that are part of this team
 
|- {{Removed}}
 
| Team Suffix
 
| String (16)
 
| Displayed after the names of players that are part of this team
 
|-
 
| Friendly Flags
 
| Byte
 
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible players on same team
 
|-
 
| Name Tag Visibility
 
| String Enum (32)
 
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code>
 
|-
 
| Collision Rule
 
| String Enum (32)
 
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code>
 
|-
 
| {{change|Color|Formatting}}
 
| {{Change|Byte|VarInt enum}}
 
| {{change|For colors, the same [[Chat]] colors (0-15). -1 indicates RESET/no color.|See below for more info.}}
 
|- {{Added}}
 
| Team Prefix
 
| Chat
 
| Displayed before the names of players that are part of this team
 
|- {{Added}}
 
| Team Suffix
 
| Chat
 
| Displayed after the names of players that are part of this team
 
|-
 
| Entity Count
 
| VarInt
 
| Number of elements in the following array
 
|-
 
| Entities
 
| Array of String (40)
 
| Identifiers for the entities in this team.  For players, this is their username; for other entities, it is their UUID.
 
|-
 
| 1: remove team
 
| ''no fields''
 
| ''no fields''
 
|
 
|-
 
|rowspan="9"| 2: update team info
 
| Team Display Name
 
| {{Change|String (32)|Chat}}
 
|
 
|- {{Removed}}
 
| Team Prefix
 
| String (16)
 
| Displayed before the names of entities that are part of this team
 
|- {{Removed}}
 
| Team Suffix
 
| String (16)
 
| Displayed after the names of entities that are part of this team
 
|-
 
| Friendly Flags
 
| Byte
 
| Bit mask. 0x01: Allow friendly fire, 0x02: can see invisible entities on same team
 
|-
 
| Name Tag Visibility
 
| String Enum (32)
 
| <code>always</code>, <code>hideForOtherTeams</code>, <code>hideForOwnTeam</code>, <code>never</code>
 
|-
 
| Collision Rule
 
| String Enum (32)
 
| <code>always</code>, <code>pushOtherTeams</code>, <code>pushOwnTeam</code>, <code>never</code>
 
|-
 
| {{change|Color|Formatting}}
 
| {{Change|Byte|VarInt enum}}
 
| {{change|For colors, the same [[Chat]] colors (0-15). -1 indicates RESET/no color.|See below for more info.}}
 
|- {{Added}}
 
| Team Prefix
 
| Chat
 
| Displayed before the names of players that are part of this team
 
|- {{Added}}
 
| Team Suffix
 
| Chat
 
| Displayed after the names of players that are part of this team
 
|-
 
|rowspan="2"| 3: add players to team
 
| Entity Count
 
| VarInt
 
| Number of elements in the following array
 
|-
 
| Entities
 
| Array of String (40)
 
| Identifiers for the entities added.  For players, this is their username; for other entities, it is their UUID.
 
|-
 
|rowspan="2"| 4: remove players from team
 
| Entity Count
 
| VarInt
 
| Number of elements in the following array
 
|-
 
| Entities
 
| Array of String (40)
 
| Identifiers for the entities removed.  For players, this is their username; for other entities, it is their UUID.
 
|}
 
 
 
Formatting: The formatting of a team defines how the names of the team members are visualized. The following table lists all the possible formattings.
 
 
 
{| class="wikitable"
 
! ID
 
! Formatting
 
|-
 
| 0-15
 
| Color formatting, same values as [[Chat]] colors.
 
|-
 
| 16
 
| Obfuscated
 
|-
 
| 17
 
| Bold
 
|-
 
| 18
 
| Strikethrough
 
|-
 
| 19
 
| Underlined
 
|-
 
| 20
 
| Italic
 
|-
 
| 21
 
| Reset
 
|}
 
  
 
=== Serverbound ===
 
=== Serverbound ===

Revision as of 20:40, 3 September 2018

This page documents the changes from the last stable Minecraft release (currently 1.12.2, protocol 340) to the current pre-release (currently 1.13.1, protocol 401). 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
Handshaking serverbound
0x00 Handshake Current Pre
Play clientbound
0x04 Spawn Painting Current Pre
0x07 Statistics Current Pre
0x09 Update Block Entity Current Pre
0x0B Block Change Current Pre
0x0C Boss Bar Current Pre
0x0F 0x0E Chat Message (clientbound) Current (unchanged)
0x10 0x0F Multi Block Change Current Pre
0x0E 0x10 Tab-Complete (clientbound) Current Pre
0x11 Declare Commands Pre
0x11 0x12 Confirm Transaction (clientbound) Current (unchanged)
0x12 0x13 Close Window (clientbound) Current (unchanged)
0x13 0x14 Open Window Current (unchanged)
0x14 0x15 Window Items Current (unchanged)
0x15 0x16 Window Property Current (unchanged)
0x16 0x17 Set Slot Current (unchanged)
0x17 0x18 Set Cooldown Current (unchanged)
0x18 0x19 Plugin Message (clientbound) Current Pre
0x19 0x1A Named Sound Effect Current Pre
0x1A 0x1B Disconnect (play) Current (unchanged)
0x1B 0x1C Entity Status Current (unchanged)
0x1D NBT Query Response Pre
0x1C 0x1E Explosion Current (unchanged)
0x1D 0x1F Unload Chunk Current (unchanged)
0x1E 0x20 Change Game State Current (unchanged)
0x1F 0x21 Keep Alive (clientbound) Current (unchanged)
0x20 0x22 Chunk Data Current Pre
0x21 0x23 Effect Current Pre
0x22 0x24 Spawn Particle Current Pre
0x23 0x25 Join Game Current (unchanged)
0x24 0x26 Map Current Pre
0x25 0x27 Entity Current (unchanged)
0x26 0x28 Entity Relative Move Current (unchanged)
0x27 0x29 Entity Look And Relative Move Current (unchanged)
0x28 0x2A Entity Look Current (unchanged)
0x29 0x2B Vehicle Move (clientbound) Current (unchanged)
0x2A 0x2C Open Sign Editor Current (unchanged)
0x2B 0x2D Craft Recipe Response Current Pre
0x2C 0x2E Player Abilities (clientbound) Current (unchanged)
0x2D 0x2F Combat Event Current (unchanged)
0x2E 0x30 Player List Item Current (unchanged)
0x31 Face Player Pre
0x2F 0x32 Player Position And Look (clientbound) Current (unchanged)
0x30 0x33 Use Bed Current (unchanged)
0x31 0x34 Unlock Recipes Current Pre
0x32 0x35 Destroy Entities Current (unchanged)
0x33 0x36 Remove Entity Effect Current (unchanged)
0x34 0x37 Resource Pack Send Current (unchanged)
0x35 0x38 Respawn Current (unchanged)
0x36 0x39 Entity Head Look Current (unchanged)
0x37 0x3A Select Advancement Tab Current (unchanged)
0x38 0x3B World Border Current (unchanged)
0x39 0x3C Camera Current (unchanged)
0x3A 0x3D Held Item Change (clientbound) Current (unchanged)
0x3B 0x3E Display Scoreboard Current (unchanged)
0x3C 0x3F Entity Metadata Current (unchanged)
0x3D 0x40 Attach Entity Current (unchanged)
0x3E 0x41 Entity Velocity Current (unchanged)
0x3F 0x42 Entity Equipment Current (unchanged)
0x40 0x43 Set Experience Current (unchanged)
0x41 0x44 Update Health Current (unchanged)
0x42 0x45 Scoreboard Objective Current Pre
0x43 0x46 Set Passengers Current (unchanged)
0x44 0x47 Teams Current Pre
0x45 0x48 Update Score Current (unchanged)
0x46 0x49 Spawn Position Current (unchanged)
0x47 0x4A Time Update Current (unchanged)
0x48 0x4B Title Current (unchanged)
0x4C Stop Sound Pre
0x49 0x4D Sound Effect Current (unchanged)
0x4A 0x4E Player List Header And Footer Current (unchanged)
0x4B 0x4F Collect Item Current (unchanged)
0x4C 0x50 Entity Teleport Current (unchanged)
0x4D 0x51 Advancements Current (unchanged)
0x4E 0x52 Entity Properties Current (unchanged)
0x4F 0x53 Entity Effect Current (unchanged)
0x54 Declare Recipes Pre
0x55 Tags Pre
Play serverbound
0x01 Query Block NBT Pre
0x01 0x05 Tab-Complete (serverbound) Current Pre
0x05 0x06 Confirm Transaction (serverbound) Current (unchanged)
0x06 0x07 Enchant Item Current (unchanged)
0x07 0x08 Click Window Current (unchanged)
0x08 0x09 Close Window (serverbound) Current (unchanged)
0x09 0x0A Plugin message (serverbound) Current Pre
0x0B Edit Book Pre
0x0C Query Entity NBT Pre
0x0A 0x0D Use Entity Current (unchanged)
0x0B 0x0E Keep Alive (serverbound) Current (unchanged)
0x0C 0x0F Player Current (unchanged)
0x0D 0x10 Player Position Current (unchanged)
0x0E 0x11 Player Position And Look (serverbound) Current (unchanged)
0x0F 0x12 Player Look Current (unchanged)
0x10 0x13 Vehicle Move (serverbound) Current (unchanged)
0x11 0x14 Steer Boat Current (unchanged)
0x15 Pick Item Pre
0x12 0x16 Craft Recipe Request Current Pre
0x13 0x17 Player Abilities (serverbound) Current (unchanged)
0x14 0x18 Player Digging Current (unchanged)
0x15 0x19 Entity Action Current (unchanged)
0x16 0x1A Steer Vehicle Current (unchanged)
0x17 0x1B Recipe Book Data Current Pre
0x1C Name Item Pre
0x18 0x1D Resource Pack Status Current (unchanged)
0x19 0x1E Advancement Tab Current (unchanged)
0x1F Select Trade Pre
0x20 Set Beacon Effect Pre
0x1A 0x21 Held Item Change (serverbound) Current (unchanged)
0x22 Update Command Block Pre
0x23 Update Command Block Minecart Pre
0x1B 0x24 Creative Inventory Action Current (unchanged)
0x25 Update Structure Block Pre
0x1C 0x26 Update Sign Current (unchanged)
0x1D 0x27 Animation (serverbound) Current (unchanged)
0x1E 0x28 Spectate Current (unchanged)
0x1F 0x29 Player Block Placement Current (unchanged)
0x20 0x2A Use Item Current (unchanged)
Login clientbound
0x04 Login Plugin Request Pre
Login serverbound
0x02 Login Plugin Response Pre

New/modified data types

No changes so far.

Entity Metadata Format

No changes so far.

Block Actions

No changes so far.

Play

Clientbound

No changes so far.

Serverbound

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.

Packet ID State Bound To Field Name Field Type Notes
0x00 Handshaking Server Protocol Version VarInt See protocol version numbers (currently 340 401)
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.
Server Port Unsigned Short Default is 25565. The Notchian server does not use this information.
Next State VarInt Enum 1 for status, 2 for login

Status

Clientbound

No changes so far.

Serverbound

No changes so far.

Login

Clientbound

No changes so far.

Serverbound

No changes so far.