Packet ID | State | Bound To | Field Name | Field Type | Notes | ||
---|---|---|---|---|---|---|---|
Play | Client | Entity ID | VarInt | ||||
Number Of Properties | Int | Number of elements in the following array | |||||
Property | Key | Array | See below | ||||
Value | Double | See below | |||||
Number Of Modifiers | VarInt | Number of elements in the following array | |||||
Modifiers | Array of Modifier Data | See Attribute#Modifiers. Modifier Data defined below. |
Packet ID | State | Bound To | Field Name | Field Type | Notes | ||
---|---|---|---|---|---|---|---|
0x47 | Play | Client | Entity ID | VarInt | Entity's EID | ||
Slot | VarInt Enum | Equipment slot. 0: main hand, 1: off hand, 2–5: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet) | |||||
Item | Slot | ||||||
Equipment | Slot | Array | Byte Enum | Equipment slot. 0: main hand, 1: off hand, 2–5: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet). Also has the top bit set if another entry follows, and otherwise unset if this is the last item in the array. | |||
Item | Slot |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Client | Entity ID | Int | The player's Entity ID (EID) | |
Gamemode | Unsigned Byte | 0: Survival, 1: Creative, 2: Adventure, 3: Spectator. Bit 3 (0x8) is the hardcore flag. | |||
Previous Gamemode | Unsigned Byte | 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included. The previous gamemode. (More information needed) | |||
World Count | VarInt | Size of the following array | |||
World Names | Array of Identifier | Identifiers for all worlds on the server | |||
Dimension Codec | NBT Tag Compound | This CompoundTag contains a ListTag named "dimension". The ListTag should contain CompoundTags with named StringTags "key" and "element". The full extent of these is still unknown, but the tag represents a dimension registry. See below for the vanilla default. | |||
Dimension | |||||
World Name | Identifier | Name of the world being spawned into | |||
Hashed seed | Long | First 8 bytes of the SHA-256 hash of the world's seed. | |||
Max Players | Unsigned Byte | Was once used by the client to draw the player list, but now is ignored | |||
Level Type | String Enum (16) | default, flat, largeBiomes, amplified, customized, buffet, default_1_1 | |||
View Distance | VarInt | Render distance (2-32) | |||
Reduced Debug Info | Boolean | If true, a Notchian client shows reduced information on the debug screen. For servers in development, this should almost always be false. | |||
Enable respawn screen | Boolean | Set to false when the doImmediateRespawn gamerule is true | |||
Is Debug | Boolean | True if the world is a debug mode world; debug mode worlds cannot be modified and have predefined blocks | |||
Is Flat | Boolean | True if the world is a superflat world; flat worlds have different void fog and a horizon at y=0 instead of y=63 |
Field Name | Field Type | Notes |
---|---|---|
UUID | UUID | |
Amount | Double | May be positive or negative |
Operation | Byte | See below |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Client | JSON Data | Chat | Limited to 32767 bytes | |
Position | Byte | 0: chat (chat box), 1: system message (chat box), 2: game info (above hotbar). | |||
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. |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
0x0F | Play | Server | Location | Position | Block entity location |
Levels | VarInt | Value of the levels slider/max depth to generate | |||
Keep Jigsaws | Boolean |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Client | Chunk X | Int | Chunk coordinate (block coordinate divided by 16, rounded down) | |
Chunk Z | Int | Chunk coordinate (block coordinate divided by 16, rounded down) | |||
Full chunk | Boolean | See Chunk Format | |||
Ignore old data | Boolean | If false, the client will recalculate lighting based on the old/new chunk data | |||
Primary Bit Mask | 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). | |||
Heightmaps | NBT | Compound containing one long array named MOTION_BLOCKING , 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 WORLD_SURFACE long array, the purpose of which is unknown, but it's not required for the chunk to be accepted. |
|||
Biomes | Optional array of Integer | 1024 biome IDs, ordered by x then z then y, in 4×4×4 blocks. Not present if full chunk is false. | |||
Size | VarInt | Size of Data in bytes | |||
Data | Byte array | See data structure in Chunk Format | |||
Number of block entities | VarInt | Number of elements in the following array | |||
Block entities | Array of NBT Tag | All block entities in the chunk. Use the x, y, and z tags in the NBT to determine their positions. |
Packet ID | State | Bound To | Field Name | Field Type | Notes | ||
---|---|---|---|---|---|---|---|
Play | Client | Num Recipes | VarInt | Number of elements in the following array | |||
Recipe | Recipe ID | Array | Identifier | ||||
Type | String | The recipe type, see below | |||||
Data | Optional, varies | Additional data for the recipe. For some types, there will be no data. |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
0x0E | Play | Server | Entity ID | VarInt | The ID of the entity to interact |
Type | VarInt Enum | 0: interact, 1: attack, 2: interact at | |||
Target X | Optional Float | Only if Type is interact at | |||
Target Y | Optional Float | Only if Type is interact at | |||
Target Z | Optional Float | Only if Type is interact at | |||
Hand | Optional VarInt Enum | Only if Type is interact or interact at; 0: main hand, 1: off hand | |||
Sneaking | Boolean | If the client is sneaking. |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
0x02 | Login | Client | UUID | ||
Username | String (16) |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Client | Dimension | |||
World Name | Identifier | Name of the world being spawned into | |||
Hashed seed | Long | First 8 bytes of the SHA-256 hash of the world's seed. | |||
Gamemode | Unsigned Byte | 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included | |||
Previous Gamemode | Unsigned Byte | 0: survival, 1: creative, 2: adventure, 3: spectator. The hardcore flag is not included. The previous gamemode. (More information needed) | |||
Level Type | String (16) | Same as Join Game | |||
Is Debug | Boolean | True if the world is a debug mode world; debug mode worlds cannot be modified and have predefined blocks | |||
Is Flat | Boolean | True if the world is a superflat world; flat worlds have different void fog and a horizon at y=0 instead of y=63 | |||
Copy metadata | Boolean | If false, metadata is reset on the respawned player entity. Set to true for dimension changes (including the dimension change triggered by sending client status perform respawn to exit the end poem/credits), and false for normal respawns. |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Server | Location | Position | Block entity location | |
Attachment type | Identifier | ||||
Name | Identifier | ||||
Target | Identifier | ||||
Identifier | |||||
Final state | String | "Turns into" on the GUI, final_state in NBT |
|||
Joint type | String | rollable if the attached piece can be rotated, else aligned |
Packet ID | State | Bound To | Field Name | Field Type | Notes | ||
---|---|---|---|---|---|---|---|
Play | Client | Chunk X | VarInt | Chunk coordinate (block coordinate divided by 16, rounded down) | |||
Chunk Z | VarInt | Chunk coordinate (block coordinate divided by 16, rounded down) | |||||
Trust Edges | Boolean | If edges should be trusted for light updates. | |||||
Sky Light Mask | VarInt | Mask containing 18 bits, with the lowest bit corresponding to chunk section -1 (in the void, y=-16 to y=-1) and the highest bit for chunk section 16 (above the world, y=256 to y=271) | |||||
Block Light Mask | VarInt | Mask containing 18 bits, with the same order as sky light | |||||
Empty Sky Light Mask | VarInt | Mask containing 18 bits, which indicates sections that have 0 for all their sky light values. If a section is set in both this mask and the main sky light mask, it is ignored for this mask and it is included in the sky light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the sky light arrays. | |||||
Empty Block Light Mask | VarInt | Mask containing 18 bits, which indicates sections that have 0 for all their block light values. If a section is set in both this mask and the main block light mask, it is ignored for this mask and it is included in the block light arrays (the notchian server does not create such masks). If it is only set in this mask, it is not included in the block light arrays. | |||||
Sky Light arrays | Length | Array | VarInt | Length of the following array in bytes (always 2048) | |||
Sky Light array | Array of 2048 bytes | There is 1 array for each bit set to true in the sky light mask, starting with the lowest value. Half a byte per light value. | |||||
Block Light arrays | Length | Array | VarInt | Length of the following array in bytes (always 2048) | |||
Block Light array | Array of 2048 bytes | There is 1 array for each bit set to true in the block light mask, starting with the lowest value. Half a byte per light value. |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
Play | Server | Flags | Byte | Bit mask. |
|
Flying Speed | Float | ||||
Walking Speed | Float |
Packet ID | State | Bound To | Field Name | Field Type | Notes |
---|---|---|---|---|---|
0x00 | Handshaking | Server | Protocol Version | VarInt | See protocol version numbers (currently |
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, 2 for login |