Difference between revisions of "Bedrock Protocol"

From wiki.vg
Jump to navigation Jump to search
(Update Disconnect (use info from github.com/Sandertv/gophertunnel))
m (Fix typo in Add Painting)
(7 intermediate revisions by 2 users not shown)
Line 14: Line 14:
 
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.
 
The Bedrock Edition Protocol uses [[wikipedia:User Datagram Protocol|UDP]] instead of [[wikipedia:Transmission Control Protocol|TCP]] that is used for the Java Edition.
 
The Bedrock Edition Client uses RakNet as its protocol library.
 
The Bedrock Edition Client uses RakNet as its protocol library.
 +
Information for this page was obtained from the [https://github.com/NukkitX/Protocol NukkitX Protocol library], [https://github.com/NiclasOlofsson/MiNET MiNET] and [https://github.com/Sandertv/gophertunnel gophertunnel].
  
 
The default Bedrock Edition port is 19132
 
The default Bedrock Edition port is 19132
Line 22: Line 23:
 
  |-
 
  |-
 
  !
 
  !
  ! Size (bytes)
+
  ! Size (Bytes)
 
  ! Range
 
  ! Range
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  ! byte
+
  ! Byte
 
  | 1
 
  | 1
 
  | 0 to 255
 
  | 0 to 255
 
  |
 
  |
 
  |-
 
  |-
  ! bool
+
  ! Boolean
 
  | 1
 
  | 1
 
  | 0 or 1
 
  | 0 or 1
  | A byte treated as boolean, 0 is false but anything greater then that is true
+
  | A Byte treated as boolean, 0 is false but anything greater then that is true
 
  |-
 
  |-
  ! short
+
  ! Short
 
  | 2
 
  | 2
 
  | -32768 to 32767
 
  | -32768 to 32767
 
  |
 
  |
 
  |-
 
  |-
  ! ushort
+
  ! Unsigned Short
 
  | 2
 
  | 2
 
  | 0 to 65535
 
  | 0 to 65535
 
  |
 
  |
 
  |-
 
  |-
  ! int
+
  ! Int
 
  | 4
 
  | 4
 
  | -2147483648 to 2147483647
 
  | -2147483648 to 2147483647
  | Signed little-endian 32-bit integer
+
  | Signed little-endian 32-bit Integer
 
  |-
 
  |-
  ! int (big endian)
+
  ! Int (big endian)
 
  | 4
 
  | 4
 
  | -2147483648 to 2147483647
 
  | -2147483648 to 2147483647
  | Signed big-endian 32-bit integer
+
  | Signed big-endian 32-bit Integer
 
  |-
 
  |-
  ! uint
+
  ! Unsigned Int
 
  | 4
 
  | 4
 
  | 0 to 4294967295
 
  | 0 to 4294967295
  | Unsigned 32-bit integer
+
  | Unsigned 32-bit Integer
 
  |-
 
  |-
  ! long
+
  ! Long
 
  | 8
 
  | 8
 
  | -2^63 to 2^63-1
 
  | -2^63 to 2^63-1
  | Signed 64-bit integer
+
  | Signed 64-bit Integer
 
  |-
 
  |-
  ! ulong
+
  ! Unsigned Long
 
  | 8
 
  | 8
 
  | 2^64-1
 
  | 2^64-1
  | Unsigned 64-bit integer
+
  | Unsigned 64-bit Integer
 
  |-
 
  |-
  ! float
+
  ! Float
 
  | 4
 
  | 4
 
  |  
 
  |  
  | A [[wikipedia:Single-precision_floating-point_format|single-precision 32-bit IEEE 754 floating point number]]
+
  | A [[wikipedia:Single-precision_Floating-poInt_format|single-precision 32-bit IEEE 754 Floating poInt number]]
 
  |-
 
  |-
  ! double
+
  ! Double
 
  | 8
 
  | 8
 
  |  
 
  |  
  | A [[wikipedia:Double-precision_floating-point_format|double-precision 64-bit IEEE 754 floating point number]]
+
  | A [[wikipedia:Double-precision_Floating-poInt_format|Double-precision 64-bit IEEE 754 Floating poInt number]]
 
  |-
 
  |-
 
  ! VarInt
 
  ! VarInt
Line 101: Line 102:
 
  |
 
  |
 
  |-
 
  |-
  ! string
+
  ! String
 
  |  
 
  |  
 
  |  
 
  |  
  | [[wikipedia:UTF-8|UTF-8]] string prefixed with its size in bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.
+
  | [[wikipedia:UTF-8|UTF-8]] String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.
 
  |-
 
  |-
 
  ! Vector3
 
  ! Vector3
 
  | 12
 
  | 12
 
  |  
 
  |  
  | Three float values (X, Y and Z respectively)
+
  | Three Float values (X, Y and Z respectively)
 
  |-
 
  |-
 
  ! Vector2
 
  ! Vector2
 
  | 8
 
  | 8
 
  |  
 
  |  
  | Two float values (X and Y respectively)
+
  | Two Float values (X and Y respectively)
 
  |-
 
  |-
 
  ! NBT
 
  ! NBT
Line 124: Line 125:
 
  |  
 
  |  
 
  |  
 
  |  
  | An arbitrary array of bytes prefixed with its size in bytes as a VarInt.
+
  | An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.
 
  |-
 
  |-
 
  ! BlockCoordinates
 
  ! BlockCoordinates
Line 134: Line 135:
 
  | 15
 
  | 15
 
  |  
 
  |  
  | Three float values (X, Y and Z respectively), followed by three bytes (pitch, head yaw and yaw respectively). To convert the bytes to normal pitch and yaw values divide them by 0.71
+
  | Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71
 
  |-
 
  |-
 
  ! UUID
 
  ! UUID
 
  | 16
 
  | 16
 
  | A [[wikipedia:Universally_unique_identifier|UUID]]
 
  | A [[wikipedia:Universally_unique_identifier|UUID]]
  | Encoded as two unsigned 64-bit integers: the most significant 64 bits and the least significant 64 bits
+
  | Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits
 
  |-
 
  |-
 
  ! Item
 
  ! Item
Line 264: Line 265:
 
  |rowspan="3"| Server
 
  |rowspan="3"| Server
 
  | Protocol version
 
  | Protocol version
  | int (big-endian)
+
  | Int (big-endian)
 
  |  
 
  |  
 
  |-
 
  |-
Line 290: Line 291:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Status
 
  | Status
  | int (big-endian)
+
  | Int (big-endian)
  | The current status of the client.
+
  | The current status of the connection.
 
  |}
 
  |}
 
   
 
   
Line 350: Line 351:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Hide disconnect screen
 
  | Hide disconnect screen
  | bool
+
  | Boolean
 
  | Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.
 
  | Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.
 
  |-
 
  |-
 
  | Kick message
 
  | Kick message
  | string
+
  | String
 
  | An optional message to show when disconnected.
 
  | An optional message to show when disconnected.
 
  |}
 
  |}
Line 370: Line 371:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Forced to Accept
 
  | Forced to Accept
  | bool
+
  | Boolean
 
  | If the resource pack requires the client accept it.
 
  | If the resource pack requires the client accept it.
 
  |-
 
  |-
 
  | Scripting Enabled
 
  | Scripting Enabled
  | bool
+
  | Boolean
 
  | If scripting is enabled.
 
  | If scripting is enabled.
 
  |-
 
  |-
Line 400: Line 401:
 
| rowspan="11" | Client
 
| rowspan="11" | Client
 
| colspan="2" | Forced to Accept
 
| colspan="2" | Forced to Accept
| colspan="2" | bool
+
| colspan="2" | Boolean
 
| If the resource pack must be accepted for the player to join the server.
 
| If the resource pack must be accepted for the player to join the server.
 
|-
 
|-
Line 410: Line 411:
 
| rowspan="3" | Array
 
| rowspan="3" | Array
 
| Pack ID
 
| Pack ID
| colspan="2" | string
+
| colspan="2" | String
 
| The ID of the resource pack.
 
| The ID of the resource pack.
 
|-
 
|-
 
| Pack Version
 
| Pack Version
| colspan="2" | string
+
| colspan="2" | String
 
| The version of the resource pack.
 
| The version of the resource pack.
 
|-
 
|-
 
| Subpack Name
 
| Subpack Name
| colspan="2" | string
+
| colspan="2" | String
 
| The subpack name of the resource pack.
 
| The subpack name of the resource pack.
 
|-
 
|-
Line 428: Line 429:
 
| rowspan="3" | Array
 
| rowspan="3" | Array
 
| Pack ID
 
| Pack ID
| colspan="2" | string
+
| colspan="2" | String
 
| The ID of the resource pack.
 
| The ID of the resource pack.
 
|-
 
|-
 
| Pack Version
 
| Pack Version
| colspan="2" | string
+
| colspan="2" | String
 
| The version of the resource pack.
 
| The version of the resource pack.
 
|-
 
|-
 
| Subpack Name
 
| Subpack Name
| colspan="2" | string
+
| colspan="2" | String
 
| The subpack name of the resource pack.
 
| The subpack name of the resource pack.
 
|-
 
|-
 
| colspan="2" | Experimental
 
| colspan="2" | Experimental
| colspan="2" | bool
+
| colspan="2" | Boolean
 
| If the sent resource and behavior packs are experimental.
 
| If the sent resource and behavior packs are experimental.
 
|-
 
|-
 
| colspan="2" | Game Version
 
| colspan="2" | Game Version
| colspan="2" | string
+
| colspan="2" | String
 
| The version of the game the sent resource and behavior packs were made for.
 
| The version of the game the sent resource and behavior packs were made for.
 
|}
 
|}
Line 460: Line 461:
 
  |rowspan="2"| Server
 
  |rowspan="2"| Server
 
  | Status
 
  | Status
  | byte
+
  | Byte
 
  | See below
 
  | See below
 
  |-
 
  |-
Line 487: Line 488:
 
| rowspan="9" | Server & Client
 
| rowspan="9" | Server & Client
 
| colspan="2" | Type
 
| colspan="2" | Type
| byte
+
| Byte
 
| The type of chat message sent.
 
| The type of chat message sent.
 
|-
 
|-
 
| colspan="2" | Needs Translation
 
| colspan="2" | Needs Translation
| bool
+
| Boolean
 
| If the message sent is a translation key and needs to be translated.
 
| If the message sent is a translation key and needs to be translated.
 
|-
 
|-
Line 501: Line 502:
 
| rowspan="1" | 0, 1, or 2
 
| rowspan="1" | 0, 1, or 2
 
| rowspan="1" | Source Name
 
| rowspan="1" | Source Name
| rowspan="1" | string
+
| rowspan="1" | String
 
| rowspan="1" | The name of the source.
 
| rowspan="1" | The name of the source.
 
|-
 
|-
Line 508: Line 509:
 
| rowspan="1" | 3, 4, or 5
 
| rowspan="1" | 3, 4, or 5
 
| rowspan="1" | Message
 
| rowspan="1" | Message
| rowspan="1" | string
+
| rowspan="1" | String
 
| rowspan="1" | The message sent with the packet.
 
| rowspan="1" | The message sent with the packet.
 
|-
 
|-
Line 516: Line 517:
 
| rowspan="2" | 6, 7, or 8
 
| rowspan="2" | 6, 7, or 8
 
| Message
 
| Message
| string
+
| String
 
| The message sent with the packet
 
| The message sent with the packet
 
|-
 
|-
Line 563: Line 564:
 
  | Jukebox Popup
 
  | Jukebox Popup
 
  |}
 
  |}
 +
 +
For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg
  
 
==== Set Time ====
 
==== Set Time ====
Line 591: Line 594:
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  |rowspan="49"| 0x0B
+
  |rowspan="47"| 0x0B
  |rowspan="49"| Client
+
  |rowspan="47"| Client
 
  | Entity ID Self
 
  | Entity ID Self
 
  | SignedVarLong
 
  | SignedVarLong
  |  
+
  | The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most servers simply fill the runtime ID of the entity out for this field.
 
  |-
 
  |-
 
  | Runtime Entity ID
 
  | Runtime Entity ID
 
  | VarLong
 
  | VarLong
  |  
+
  | The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.
 
  |-
 
  |-
 
  | Player Gamemode
 
  | Player Gamemode
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The game mode the player currently has. It is a value from 0-4, with 0 being survival mode, 1 being creative mode, 2 being adventure mode, 3 being survival spectator and 4 being creative spectator. This field may be set to 5 to make the client fall back to the game mode set in the "World Gamemode" field.
 
  |-
 
  |-
 
  | Spawn
 
  | Spawn
 
  | Vector3
 
  | Vector3
  |  
+
  | The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.
 
  |-
 
  |-
 
  | Rotation
 
  | Rotation
 
  | Vector2
 
  | Vector2
  |  
+
  | The pitch and yaw of the player
 
  |-
 
  |-
 
  | Seed
 
  | Seed
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.
 
  |-
 
  |-
 
  | Dimension
 
  | Dimension
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.
 
  |-
 
  |-
 
  | Generator
 
  | Generator
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.
 
  |-
 
  |-
  | Gamemode
+
  | World Gamemode
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.
 
  |-
 
  |-
 
  | Difficulty
 
  | Difficulty
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.
 
  |-
 
  |-
  | X
+
  | World Spawn
  | SignedVarInt
+
  | BlockCoordinates
|
+
  | The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.
|-
 
| Y
 
| VarInt
 
|
 
|-
 
| Z
 
| SignedVarInt
 
  |  
 
 
  |-
 
  |-
 
  | Has achievements disabled
 
  | Has achievements disabled
  | bool
+
  | Boolean
  |  
+
  | Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.
 
  |-
 
  |-
 
  | Day cycle stop time
 
  | Day cycle stop time
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.
 
  |-
 
  |-
 
  | EDU offer
 
  | EDU offer
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.
 
  |-
 
  |-
  | Has EDU features enabled
+
  | Has Education Edition features enabled
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.
 
  |-
 
  |-
 
  | Rain level
 
  | Rain level
  | float
+
  | Float
  |  
+
  | The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.
 
  |-
 
  |-
 
  | Lightning level
 
  | Lightning level
  | float
+
  | Float
  |  
+
  | The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.
 
  |-
 
  |-
 
  | Has Confirmed Platform Locked Content
 
  | Has Confirmed Platform Locked Content
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is Multiplayer
 
  | Is Multiplayer
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world is a multi-player game. This should always be set to true for servers.
 
  |-
 
  |-
 
  | Broadcast To LAN
 
  | Broadcast To LAN
  | bool
+
  | Boolean
  |  
+
  | Specifies if LAN broadcast was Intended to be enabled for the world.
 
  |-
 
  |-
 
  | Xbox Live Broadcast Mode
 
  | Xbox Live Broadcast Mode
 
  | VarInt
 
  | VarInt
  |  
+
  | The mode used to broadcast the joined game across XBOX Live.
 
  |-
 
  |-
 
  | Platform Broadcast Mode
 
  | Platform Broadcast Mode
 
  | VarInt
 
  | VarInt
  |  
+
  | The mode used to broadcast the joined game across the platform.
 
  |-
 
  |-
 
  | Enable commands
 
  | Enable commands
  | bool
+
  | Boolean
  |  
+
  | If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.
 
  |-
 
  |-
  | Is texturepacks required
+
  | Are texture packs required
  | bool
+
  | Boolean
  |  
+
  | Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.
 
  |-
 
  |-
 
  | GameRules
 
  | GameRules
 
  | GameRules
 
  | GameRules
  |  
+
  | Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.
 
  |-
 
  |-
 
  | Bonus Chest
 
  | Bonus Chest
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.
 
  |-
 
  |-
 
  | Map Enabled
 
  | Map Enabled
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.
 
  |-
 
  |-
 
  | Permission Level
 
  | Permission Level
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.
 
  |-
 
  |-
 
  | Server Chunk Tick Range
 
  | Server Chunk Tick Range
  | int
+
  | Int
  |  
+
  | The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.
 
  |-
 
  |-
 
  | Has Locked Behavior Pack
 
  | Has Locked Behavior Pack
  | bool
+
  | Boolean
  |  
+
  | Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.
 
  |-
 
  |-
 
  | Has Locked Resource Pack
 
  | Has Locked Resource Pack
  | bool
+
  | Boolean
  |  
+
  | Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.
 
  |-
 
  |-
 
  | Is From Locked World Template
 
  | Is From Locked World Template
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world from the server was from a locked world template. For servers this should always be set to false.
 
  |-
 
  |-
 
  | Use MSA Gamertags Only
 
  | Use MSA Gamertags Only
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is From World Template
 
  | Is From World Template
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world from the server was from a locked world template. For servers this should always be set to false.
 
  |-
 
  |-
 
  | Is World Template Option Locked
 
  | Is World Template Option Locked
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.
 
  |-
 
  |-
 
  | Only Spawn V1 Villagers
 
  | Only Spawn V1 Villagers
  | bool
+
  | Boolean
  |  
+
  | A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.
 
  |-
 
  |-
 
  | Game Version
 
  | Game Version
  | string
+
  | String
  |  
+
  | The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.
 
  |-
 
  |-
 
  | Level ID
 
  | Level ID
  | string
+
  | String
  |  
+
  | A base64 encoded world ID that is used to identify the world.
 
  |-
 
  |-
 
  | World name
 
  | World name
  | string
+
  | String
  |  
+
  | The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.
 
  |-
 
  |-
 
  | Premium World Template Id
 
  | Premium World Template Id
  | string
+
  | String
  |  
+
  | A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.
 
  |-
 
  |-
 
  | Is Trial
 
  | Is Trial
  | bool
+
  | Boolean
  |  
+
  | Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.
 
  |-
 
  |-
 
  | Is Server Side movement enabled
 
  | Is Server Side movement enabled
  | bool
+
  | Boolean
  |  
+
  | Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.
 
  |-
 
  |-
 
  | Current Tick
 
  | Current Tick
  | long
+
  | Boolean
  |  
+
  | The total time in ticks that has elapsed since the start of the world.
 
  |-
 
  |-
 
  | Enchantment Seed
 
  | Enchantment Seed
 
  | SignedVarInt
 
  | SignedVarInt
  |  
+
  | The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.
 
  |-
 
  |-
 
  | Block Palette
 
  | Block Palette
 
  | BlockPalette
 
  | BlockPalette
  |  
+
  | A list of all blocks registered on the server.
 
  |-
 
  |-
 
  | Itemstates
 
  | Itemstates
 
  | Itemstates
 
  | Itemstates
  |  
+
  | A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.
 
  |-
 
  |-
 
  | Multiplayer Correlation ID
 
  | Multiplayer Correlation ID
  | string
+
  | String
  |  
+
  | A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.
 
  |}
 
  |}
 
 
  
 
==== Add Player ====
 
==== Add Player ====
Line 808: Line 801:
 
  |-
 
  |-
 
  | Username
 
  | Username
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 820: Line 813:
 
  |-
 
  |-
 
  | Platform Chat ID
 
  | Platform Chat ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | X
 
  | X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Y
 
  | Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Z
 
  | Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed X
 
  | Speed X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Y
 
  | Speed Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Z
 
  | Speed Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Pitch
 
  | Pitch
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Yaw
 
  | Yaw
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Head Yaw
 
  | Head Yaw
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
Line 888: Line 881:
 
  |-
 
  |-
 
  | User Id
 
  | User Id
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
Line 896: Line 889:
 
  |-
 
  |-
 
  | Device ID
 
  | Device ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Device OS
 
  | Device OS
  | int
+
  | Int
 
  |  
 
  |  
 
  |}
 
  |}
Line 926: Line 919:
 
  |-
 
  |-
 
  | Entity Type
 
  | Entity Type
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | X
 
  | X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Y
 
  | Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Z
 
  | Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed X
 
  | Speed X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Y
 
  | Speed Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Z
 
  | Speed Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Pitch
 
  | Pitch
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Yaw
 
  | Yaw
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Head Yaw
 
  | Head Yaw
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,022: Line 1,015:
 
  |-
 
  |-
 
  | X
 
  | X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Y
 
  | Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Z
 
  | Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed X
 
  | Speed X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Y
 
  | Speed Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Speed Z
 
  | Speed Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,050: Line 1,043:
 
  |-
 
  |-
 
  | Is From Fishing
 
  | Is From Fishing
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,098: Line 1,091:
 
  |-
 
  |-
 
  | On ground
 
  | On ground
  | boolean
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Teleported
 
  | Teleported
  | boolean
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,132: Line 1,125:
 
  |-
 
  |-
 
  | Mode
 
  | Mode
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | On ground
 
  | On ground
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Riding runtime entity id
 
  | Riding runtime entity id
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Teleportation cause
 
  | Teleportation cause
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Entity type
 
  | Entity type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | On Ground
 
  | On Ground
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,249: Line 1,242:
 
  |-
 
  |-
 
  | Name
 
  | Name
  | string
+
  | String
  | This is the name of the painting (e.g. BurningSkull)
+
  | This is the name of the paInting (e.g. BurningSkull)
 
  |}
 
  |}
 
   
 
   
Line 1,277: Line 1,270:
 
* Skeleton
 
* Skeleton
 
* DonkeyKong
 
* DonkeyKong
* Pointer
+
* PoInter
 
* Pigscene
 
* Pigscene
 
* BurningSkull
 
* BurningSkull
Line 1,293: Line 1,286:
 
  |rowspan="2"| Server & Client
 
  |rowspan="2"| Server & Client
 
  | Request Timestamp
 
  | Request Timestamp
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Response Timestamp
 
  | Response Timestamp
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,315: Line 1,308:
 
  |rowspan="6"| Server & Client
 
  |rowspan="6"| Server & Client
 
  | Sound ID
 
  | Sound ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,331: Line 1,324:
 
  |-
 
  |-
 
  | Is baby mob
 
  | Is baby mob
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is global
 
  | Is global
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,407: Line 1,400:
 
  |-
 
  |-
 
  | Event ID
 
  | Event ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,433: Line 1,426:
 
  |-
 
  |-
 
  | Event
 
  | Event
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,445: Line 1,438:
 
  |-
 
  |-
 
  | Particles
 
  | Particles
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,519: Line 1,512:
 
  |-
 
  |-
 
  | Slot
 
  | Slot
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Selected Slot
 
  | Selected Slot
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Windows Id
 
  | Windows Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,579: Line 1,572:
 
  |rowspan="2"| Server & Client
 
  |rowspan="2"| Server & Client
 
  | Action ID
 
  | Action ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,617: Line 1,610:
 
  |-
 
  |-
 
  | Hotbar Slot
 
  | Hotbar Slot
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,635: Line 1,628:
 
  |rowspan="2"| Server
 
  |rowspan="2"| Server
 
  | Runtime Entity Id
 
  | Runtime Entity Id
  | ulong
+
  | Unsigned Long
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Hotbar Slot
 
  | Hotbar Slot
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,691: Line 1,684:
 
  |-
 
  |-
 
  | Fall Distance
 
  | Fall Distance
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | In Void
 
  | In Void
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,761: Line 1,754:
 
  |-
 
  |-
 
  | Motion Y
 
  | Motion Y
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Motion Z
 
  | Motion Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,791: Line 1,784:
 
  |-
 
  |-
 
  | Link Type
 
  | Link Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown
 
  | Unknown
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,839: Line 1,832:
 
  |-
 
  |-
 
  | Forced
 
  | Forced
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,883: Line 1,876:
 
  |-
 
  |-
 
  | Runtime Entity Id
 
  | Runtime Entity Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,903: Line 1,896:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Window Id
 
  | Window Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Type
 
  | Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 1,933: Line 1,926:
 
  |rowspan="1"| Server & Client
 
  |rowspan="1"| Server & Client
 
  | Window Id
 
  | Window Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 1,955: Line 1,948:
 
  |-
 
  |-
 
  | Container Id
 
  | Container Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Select Hotbar Slot
 
  | Select Hotbar Slot
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,025: Line 2,018:
 
  |rowspan="3"| Client
 
  |rowspan="3"| Client
 
  | Window Id
 
  | Window Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,063: Line 2,056:
 
  |-
 
  |-
 
  | Is Clean
 
  | Is Clean
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,081: Line 2,074:
 
  |rowspan="5"| Server & Client
 
  |rowspan="5"| Server & Client
 
  | Window ID
 
  | Window ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,151: Line 2,144:
 
  |-
 
  |-
 
  | User Id
 
  | User Id
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,191: Line 2,184:
 
  |rowspan="4"| Server
 
  |rowspan="4"| Server
 
  | Motion X
 
  | Motion X
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Motion Z
 
  | Motion Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Jumping
 
  | Jumping
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Sneaking
 
  | Sneaking
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,233: Line 2,226:
 
  |-
 
  |-
 
  | Cache Enabled
 
  | Cache Enabled
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,255: Line 2,248:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Commands enabled
 
  | Commands enabled
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,299: Line 2,292:
 
  |-
 
  |-
 
  | Position Y
 
  | Position Y
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Position Z
 
  | Position Z
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Respawn
 
  | Respawn
  | boolean
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,361: Line 2,354:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Event Type
 
  | Event Type
  | ushort
+
  | Unsigned Short
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,387: Line 2,380:
 
  |-
 
  |-
 
  | Event type
 
  | Event type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,505: Line 2,498:
 
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:
 
According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:
  
     int y;
+
     Int y;
 
     if (packet.getBlockPosition().getY() > 0) {
 
     if (packet.getBlockPosition().getY() > 0) {
 
         y = packet.getBlockPosition().getY() * 2;
 
         y = packet.getBlockPosition().getY() * 2;
Line 2,624: Line 2,617:
 
  |rowspan="5"| Server
 
  |rowspan="5"| Server
 
  | Command
 
  | Command
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,636: Line 2,629:
 
  |-
 
  |-
 
  | Request ID
 
  | Request ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown
 
  | Unknown
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,658: Line 2,651:
 
  |rowspan="1"| Server
 
  |rowspan="1"| Server
 
  | Is Block
 
  | Is Block
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,692: Line 2,685:
 
  |rowspan="10"| Client
 
  |rowspan="10"| Client
 
  | Window ID
 
  | Window ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Window Type
 
  | Window Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,712: Line 2,705:
 
  |-
 
  |-
 
  | Is Willing
 
  | Is Willing
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,724: Line 2,717:
 
  |-
 
  |-
 
  | Display Name
 
  | Display Name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,746: Line 2,739:
 
  |rowspan="5"| Client
 
  |rowspan="5"| Client
 
  | Window ID
 
  | Window ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Window Type
 
  | Window Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown
 
  | Unknown
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,780: Line 2,773:
 
  |rowspan="7"| Client
 
  |rowspan="7"| Client
 
  | Package ID
 
  | Package ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Max Chunk Size
 
  | Max Chunk Size
  | uint
+
  | Unsigned Int
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Chunk Count
 
  | Chunk Count
  | uint
+
  | Unsigned Int
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Compressed Package Size
 
  | Compressed Package Size
  | ulong
+
  | Unsigned Long
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,800: Line 2,793:
 
  |-
 
  |-
 
  | Is Premium
 
  | Is Premium
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Pack Type
 
  | Pack Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,822: Line 2,815:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Package ID
 
  | Package ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Chunk Index
 
  | Chunk Index
  | uint
+
  | Unsigned Int
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Progress
 
  | Progress
  | ulong
+
  | Unsigned Long
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,852: Line 2,845:
 
  |rowspan="2"| Server
 
  |rowspan="2"| Server
 
  | Package ID
 
  | Package ID
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Chunk Index
 
  | Chunk Index
  | uint
+
  | Unsigned Int
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,874: Line 2,867:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Address
 
  | Address
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Port
 
  | Port
  | ushort
+
  | Unsigned Short
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,896: Line 2,889:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Sound name
 
  | Sound name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,904: Line 2,897:
 
  |-
 
  |-
 
  | Volume
 
  | Volume
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Pitch
 
  | Pitch
  | float
+
  | Float
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,926: Line 2,919:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Sound Name
 
  | Sound Name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Stopping All Sound
 
  | Stopping All Sound
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 2,952: Line 2,945:
 
  |-
 
  |-
 
  | Text
 
  | Text
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 2,982: Line 2,975:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Behavior Tree Json
 
  | Behavior Tree Json
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,016: Line 3,009:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Offer Id
 
  | Offer Id
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Shown To All
 
  | Shown To All
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,062: Line 3,055:
 
  |-
 
  |-
 
  | Skin Name
 
  | Skin Name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Old Skin Name
 
  | Old Skin Name
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,100: Line 3,093:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Address
 
  | Address
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,156: Line 3,149:
 
  |-
 
  |-
 
  | Unknown0
 
  | Unknown0
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown1
 
  | Unknown1
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown2
 
  | Unknown2
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,180: Line 3,173:
 
  |rowspan="3"| Server
 
  |rowspan="3"| Server
 
  | File name
 
  | File name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Image data
 
  | Image data
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Unknown2
 
  | Unknown2
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,210: Line 3,203:
 
  |-
 
  |-
 
  | Form Data
 
  | Form Data
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,232: Line 3,225:
 
  |-
 
  |-
 
  | Form Data
 
  | Form Data
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,270: Line 3,263:
 
  |-
 
  |-
 
  | Form Data
 
  | Form Data
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,288: Line 3,281:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Xuid
 
  | Xuid
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,324: Line 3,317:
 
  |rowspan="1"| Client
 
  |rowspan="1"| Client
 
  | Objective Id
 
  | Objective Id
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,342: Line 3,335:
 
  |rowspan="5"| Client
 
  |rowspan="5"| Client
 
  | Display Slot
 
  | Display Slot
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Objective Id
 
  | Objective Id
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Display Name
 
  | Display Name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Criteria
 
  | Criteria
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,394: Line 3,387:
 
  |rowspan="5"| Server & Client
 
  |rowspan="5"| Server & Client
 
  | Unknown Byte 0
 
  | Unknown Byte 0
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,410: Line 3,403:
 
  |-
 
  |-
 
  | Reaction Type
 
  | Reaction Type
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,470: Line 3,463:
 
  |-
 
  |-
 
  | Flags
 
  | Flags
  | ushort
+
  | Unsigned Short
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,540: Line 3,533:
 
  |rowspan="2"| Server & Client
 
  |rowspan="2"| Server & Client
 
  | Timestamp
 
  | Timestamp
  | ulong
+
  | Unsigned Long
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Send Back
 
  | Send Back
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,562: Line 3,555:
 
  |rowspan="2"| Server & Client
 
  |rowspan="2"| Server & Client
 
  | Event Name
 
  | Event Name
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Data
 
  | Data
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,584: Line 3,577:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Dimension Id
 
  | Dimension Id
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,596: Line 3,589:
 
  |-
 
  |-
 
  | Identifier
 
  | Identifier
  | string
+
  | String
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,632: Line 3,625:
 
  |rowspan="6"| Server & Client
 
  |rowspan="6"| Server & Client
 
  | Sound ID
 
  | Sound ID
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,644: Line 3,637:
 
  |-
 
  |-
 
  | Entity Type
 
  | Entity Type
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is baby mob
 
  | Is baby mob
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is global
 
  | Is global
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,722: Line 3,715:
 
  |-
 
  |-
 
  | Entity Type
 
  | Entity Type
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is baby mob
 
  | Is baby mob
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Is global
 
  | Is global
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,764: Line 3,757:
 
  |rowspan="4"| Client
 
  |rowspan="4"| Client
 
  | Page
 
  | Page
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Total Pages
 
  | Total Pages
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,776: Line 3,769:
 
  |-
 
  |-
 
  | Dropping Book
 
  | Dropping Book
  | boolean
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,794: Line 3,787:
 
  |rowspan="5"| Client
 
  |rowspan="5"| Client
 
  | Server URI
 
  | Server URI
  | string
+
  | String
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Frame Send Frequency
 
  | Frame Send Frequency
  | float
+
  | Float
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Action
 
  | Action
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Resolution X
 
  | Resolution X
  | int
+
  | Int
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Resolution Y
 
  | Resolution Y
  | int
+
  | Int
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,828: Line 3,821:
 
  |rowspan="1"| Server & Client
 
  |rowspan="1"| Server & Client
 
  | Supported
 
  | Supported
  | bool
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,862: Line 3,855:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Original Map Id
 
  | Original Map Id
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |-
 
  |-
 
  | New Map Id
 
  | New Map Id
  | long
+
  | Boolean
 
  |  
 
  |  
 
  |}
 
  |}
Line 3,916: Line 3,909:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Unknown
 
  | Unknown
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
Line 3,970: Line 3,963:
 
  |rowspan="2"| Client
 
  |rowspan="2"| Client
 
  | Unknown
 
  | Unknown
  | byte
+
  | Byte
 
  |  
 
  |  
 
  |-
 
  |-
 
  | Compression threshold
 
  | Compression threshold
  | short
+
  | Short
 
  |  
 
  |  
 
  |}
 
  |}
  
 
[[Category:Bedrock Minecraft]]
 
[[Category:Bedrock Minecraft]]

Revision as of 14:53, 4 June 2020

Remember that this page is a WIP. Come back later to see a more complete page.

Heads up!

This article is about the protocol for the latest stable release of Minecraft Bedrock Edition (1.14.60, protocol 390). See Protocol for the Java Edition Protocol.

This is the Bedrock Edition Protocol Documentation. The Bedrock Edition Protocol uses UDP instead of TCP that is used for the Java Edition. The Bedrock Edition Client uses RakNet as its protocol library. Information for this page was obtained from the NukkitX Protocol library, MiNET and gophertunnel.

The default Bedrock Edition port is 19132

Contents

Data types

Size (Bytes) Range Notes
Byte 1 0 to 255
Boolean 1 0 or 1 A Byte treated as boolean, 0 is false but anything greater then that is true
Short 2 -32768 to 32767
Unsigned Short 2 0 to 65535
Int 4 -2147483648 to 2147483647 Signed little-endian 32-bit Integer
Int (big endian) 4 -2147483648 to 2147483647 Signed big-endian 32-bit Integer
Unsigned Int 4 0 to 4294967295 Unsigned 32-bit Integer
Long 8 -2^63 to 2^63-1 Signed 64-bit Integer
Unsigned Long 8 2^64-1 Unsigned 64-bit Integer
Float 4 A single-precision 32-bit IEEE 754 Floating poInt number
Double 8 A Double-precision 64-bit IEEE 754 Floating poInt number
VarInt ≥ 1
≤ 5
0 to 4294967295
SignedVarInt ≥ 1
≤ 5
-2147483648 and 2147483647
VarLong ≥ 1
≤ 10
SignedVarLong ≥ 1
≤ 10
-2^63 and 2^63-1
String UTF-8 String prefixed with its size in Bytes as a VarInt. This has the same data structure as a ByteArray but it contains textual data.
Vector3 12 Three Float values (X, Y and Z respectively)
Vector2 8 Two Float values (X and Y respectively)
NBT
ByteArray An arbitrary array of Bytes prefixed with its size in Bytes as a VarInt.
BlockCoordinates ≥ 3
≤ 15
A SignedVarInt, a normal VarInt and another SignedVarInt (X, Y and Z respectively)
PlayerLocation 15 Three Float values (X, Y and Z respectively), followed by three Bytes (pitch, head yaw and yaw respectively). To convert the Bytes to normal pitch and yaw values divide them by 0.71
UUID 16 A UUID Encoded as two unsigned 64-bit Integers: the most significant 64 bits and the least significant 64 bits
Item
ItemStacks
Itemstates
EntityAttributes
PlayerAttributes
Skin
Recipes
GameRules
Transaction
BlockPalette
ScoreEntries
MapInfo
PlayerRecords
ScoreboardIdentityEntries
MetadataDictionary
PotionTypeRecipe
PotionContainerChangeRecipe
ResourcePackInfos
ResourcePackIdVersions
ResourcePackIds

Packet Format

Login process

Packets

Please note that some packet ids are missing, so they don't line up. The following packet ids are missing: 0x10, 0x74, 0x7F, 0x80 (16, 116, 127, 128)

Login

Packet ID Bound To Field Name Field Type Notes
0x01 Server Protocol version Int (big-endian)
Chain data JSON array of JWT Data Contains the display name, UUID and XUID
Skin data JWT Data


Play Status

Packet ID Bound To Field Name Field Type Notes
0x02 Client Status Int (big-endian) The current status of the connection.

The values for each status are as follows:

  • 0: Login success
  • 1: Failed client
  • 2: Failed server
  • 3 Player spawn
  • 4 Failed invalid Tenant
  • 5: Failed Vanilla Edu.
  • 6: Failed Edu. Vanilla
  • 7: Failed server full

Server To Client Handshake

Packet ID Bound To Field Name Field Type Notes
0x03 Client JWT data JWT String Contains the salt to complete the Diffie-Hellman key exchange


Client To Server Handshake

Packet ID Bound To Field Name Field Type Notes
0x04 Server


Disconnect

Packet ID Bound To Field Name Field Type Notes
0x05 Client Hide disconnect screen Boolean Specifies if the disconnection screen should be hidden when the client is disconnected, meaning it will be sent directly to the main menu.
Kick message String An optional message to show when disconnected.

Resource Packs info

Packet ID Bound To Field Name Field Type Notes
0x06 Client Forced to Accept Boolean If the resource pack requires the client accept it.
Scripting Enabled Boolean If scripting is enabled.
BehahaviorPackInfos ResourcePackInfos
ResourcePackInfos ResourcePackInfos


Resource Pack Stack

Packet ID Bound To Field Name Field Type Notes
0x07 Client Forced to Accept Boolean If the resource pack must be accepted for the player to join the server.
Resource Pack Entry Field Name
Array Pack ID String The ID of the resource pack.
Pack Version String The version of the resource pack.
Subpack Name String The subpack name of the resource pack.
Behavior Pack Entry Field Name
Array Pack ID String The ID of the resource pack.
Pack Version String The version of the resource pack.
Subpack Name String The subpack name of the resource pack.
Experimental Boolean If the sent resource and behavior packs are experimental.
Game Version String The version of the game the sent resource and behavior packs were made for.

Resource Pack Response

Packet ID Bound To Field Name Field Type Notes
0x08 Server Status Byte See below
Pack IDs ResourcePackIds All of the pack IDs.

The values for each status are as follows:

  • 0: None
  • 1: Refused
  • 2: Send packs
  • 3: Have all packs
  • 4: Completed

Text

Packet ID Bound To Field Name Field Type Notes
0x09 Server & Client Type Byte The type of chat message sent.
Needs Translation Boolean If the message sent is a translation key and needs to be translated.
Chat Type ID Text Derived from above; values sent here change depending on that.
0, 1, or 2 Source Name String The name of the source.
3, 4, or 5 Message String The message sent with the packet.
6, 7, or 8 Message String The message sent with the packet
Parameters Array The parameters sent with the packet. This usually includes translation parameters or similar types depending on what kind of chat type was sent.
XUID Optional String The XUID of the player who sent this message.
Platform Chat ID Optional String The platform chat ID of the sent message.
ID Chat Type
0 Chat
1 Whisper
2 Announcement
3 Raw
4 Tip
5 System
6 Translation
7 Popup
8 Jukebox Popup

For additional information and examples of all the chat types above, see here: https://imgur.com/a/KhcFscg

Set Time

Packet ID Bound To Field Name Field Type Notes
0x0A Client Time SignedVarInt


Start Game

Packet ID Bound To Field Name Field Type Notes
0x0B Client Entity ID Self SignedVarLong The unique ID of the player. The unique ID is a value that remains consistent across different sessions of the same world, but most servers simply fill the runtime ID of the entity out for this field.
Runtime Entity ID VarLong The runtime ID of the player. The runtime ID is unique for each world session, and entities are generally identified in packets using this runtime ID.
Player Gamemode SignedVarInt The game mode the player currently has. It is a value from 0-4, with 0 being survival mode, 1 being creative mode, 2 being adventure mode, 3 being survival spectator and 4 being creative spectator. This field may be set to 5 to make the client fall back to the game mode set in the "World Gamemode" field.
Spawn Vector3 The spawn position of the player in the world. In servers this is often the same as the world's spawn position found below.
Rotation Vector2 The pitch and yaw of the player
Seed SignedVarInt The seed used to generate the world. Unlike in Java edition, the seed is a 32bit Integer here.
Dimension SignedVarInt Dimension is the ID of the dimension that the player spawns in. It is a value from 0-2, with 0 being the overworld, 1 being the nether and 2 being the end.
Generator SignedVarInt Generator is the generator used for the world. It is a value from 0-4, with 0 being old limited worlds, 1 being infinite worlds, 2 being flat worlds, 3 being nether worlds and 4 being end worlds. A value of 0 will actually make the client stop rendering chunks you send beyond the world limit.
World Gamemode SignedVarInt The game mode that a player gets when it first spawns in the world. It is shown in the settings and is used if the Player Gamemode is set to 5.
Difficulty SignedVarInt Difficulty is the difficulty of the world. It is a value from 0-3, with 0 being peaceful, 1 being easy, 2 being normal and 3 being hard.
World Spawn BlockCoordinates The block on which the world spawn of the world. This coordinate has no effect on the place that the client spawns, but it does have an effect on the direction that a compass poInts.
Has achievements disabled Boolean Defines if achievements are disabled in the world. The client crashes if this value is set to true while the player's or the world's game mode is creative, and it's recommended to simply always set this to false as a server.
Day cycle stop time SignedVarInt The time at which the day cycle was locked if the day cycle is disabled using the respective game rule. The client will maIntain this time as Boolean as the day cycle is disabled.
EDU offer SignedVarInt Some Minecraft: Education Edition field that specifies what 'region' the world was from, with 0 being None, 1 being RestOfWorld, and 2 being China. The actual use of this field is unknown.
Has Education Edition features enabled Boolean Specifies if the world has education edition features enabled, such as the blocks or entities specific to education edition.
Rain level Float The level specifying the Intensity of the rain falling. When set to 0, no rain falls at all.
Lightning level Float The level specifying the Intensity of the thunder. This may actually be set independently from the rain level, meaning dark clouds can be produced without rain.
Has Confirmed Platform Locked Content Boolean
Is Multiplayer Boolean Specifies if the world is a multi-player game. This should always be set to true for servers.
Broadcast To LAN Boolean Specifies if LAN broadcast was Intended to be enabled for the world.
Xbox Live Broadcast Mode VarInt The mode used to broadcast the joined game across XBOX Live.
Platform Broadcast Mode VarInt The mode used to broadcast the joined game across the platform.
Enable commands Boolean If commands are enabled for the player. It is recommended to always set this to true on the server, as setting it to false means the player cannot, under any circumstance, use a command.
Are texture packs required Boolean Specifies if the texture pack the world might hold is required, meaning the client was forced to download it before joining.
GameRules GameRules Defines game rules currently active with their respective values. The value of these game rules may be either 'bool', 'Int32' or 'Float32'. Some game rules are server side only, and don't necessarily need to be sent to the client.
Bonus Chest Boolean Specifies if the world had the bonus map setting enabled when generating it. It does not have any effect client-side.
Map Enabled Boolean Specifies if the world has the start with map setting enabled, meaning each joining player obtains a map. This should always be set to false, because the client obtains a map all on its own accord if this is set to true.
Permission Level SignedVarInt The permission level of the player. It is a value from 0-3, with 0 being visitor, 1 being member, 2 being operator and 3 being custom.
Server Chunk Tick Range Int The radius around the player in which chunks are ticked. Most servers set this value to a fixed number, as it does not necessarily affect anything client-side.
Has Locked Behavior Pack Boolean Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.
Has Locked Resource Pack Boolean Specifies if the texture pack of the world is locked, meaning it cannot be disabled from the world. This is typically set for worlds on the marketplace that have a dedicated texture pack.
Is From Locked World Template Boolean Specifies if the world from the server was from a locked world template. For servers this should always be set to false.
Use MSA Gamertags Only Boolean
Is From World Template Boolean Specifies if the world from the server was from a locked world template. For servers this should always be set to false.
Is World Template Option Locked Boolean Specifies if the world was a template that locks all settings that change properties above in the settings GUI. It is recommended to set this to true for servers that do not allow things such as setting game rules through the GUI.
Only Spawn V1 Villagers Boolean A hack that Mojang put in place to preserve backwards compatibility with old villagers. The his never actually read though, so it has no functionality.
Game Version String The version of the game from which Vanilla features will be used. The exact function of this field isn't clear.
Level ID String A base64 encoded world ID that is used to identify the world.
World name String The name of the world that the player is joining. Note that this field shows up above the player list for the rest of the game session, and cannot be changed. Setting the server name to this field is recommended.
Premium World Template Id String A UUID specific to the premium world template that might have been used to generate the world. Servers should always fill out an empty String for this.
Is Trial Boolean Specifies if the world was a trial world, meaning features are limited and there is a time limit on the world.
Is Server Side movement enabled Boolean Specifies if the server is authoritative over the movement of the player, meaning it controls the movement of it.
Current Tick Boolean The total time in ticks that has elapsed since the start of the world.
Enchantment Seed SignedVarInt The seed used to seed the random used to produce enchantments in the enchantment table. Note that the exact correct random implementation must be used to produce the correct results both client- and server-side.
Block Palette BlockPalette A list of all blocks registered on the server.
Itemstates Itemstates A list of all items with their legacy IDs which are available in the game. Failing to send any of the items that are in the game will crash mobile clients.
Multiplayer Correlation ID String A unique ID specifying the multi-player session of the player. A random UUID should be filled out for this field.

Add Player

Packet ID Bound To Field Name Field Type Notes
0x0C Client UUID UUID
Username String
Entity ID Self SignedVarLong
Runtime Entity ID VarLong
Platform Chat ID String
X Float
Y Float
Z Float
Speed X Float
Speed Y Float
Speed Z Float
Pitch Float
Yaw Float
Head Yaw Float
Item Item
Metadata MetadataDictionary
Flags VarInt
Command permission VarInt
Action Permissions VarInt
Permission Level VarInt
Custom stored permissions VarInt
User Id Boolean
Links Links
Device ID String
Device OS Int


Add Entity

Packet ID Bound To Field Name Field Type Notes
0x0D Client Entity ID Self SignedVarLong
Runtime Entity ID VarLong
Entity Type String
X Float
Y Float
Z Float
Speed X Float
Speed Y Float
Speed Z Float
Pitch Float
Yaw Float
Head Yaw Float
Attributes EntityAttributes
Metadata MetadataDictionary
Links Links


Remove Entity

Packet ID Bound To Field Name Field Type Notes
0x0E Client Unique Entity Id SignedVarLong


Add Item Entity

Packet ID Bound To Field Name Field Type Notes
0x0F Client Entity ID Self SignedVarLong
Runtime Entity ID VarLong
Item Item
X Float
Y Float
Z Float
Speed X Float
Speed Y Float
Speed Z Float
Metadata MetadataDictionary
Is From Fishing Boolean


Take Item Entity

Packet ID Bound To Field Name Field Type Notes
0x11 Client Item Runtime Entity Id VarLong
Runtime Entity Id VarLong


Move Entity Absolute

Packet ID Bound To Field Name Field Type Notes
0x12 Server & Client Runtime entity id VarLong
Position PlayerLocation
On ground Boolean
Teleported Boolean

This packet is sent serverbound when riding a horse/donkey.

Move Player

Packet ID Bound To Field Name Field Type Notes
0x13 Server & Client Runtime entity id VarLong
Position Vector3
Rotation Vector3 Pitch, yaw and head yaw
Mode Byte
On ground Boolean
Riding runtime entity id Float
Teleportation cause Float
Entity type Byte
On Ground Boolean
Other Runtime Entity ID VarLong

Modes:

  • 0: Normal
  • 1: Reset
  • 2: Teleport
  • 3: Rotation

Teleportation causes:

  • 0: Unknown
  • 1: Projectile
  • 2: Chorus fruit
  • 3: Command
  • 4: Behavior

Rider Jump

Packet ID Bound To Field Name Field Type Notes
0x14 Server & Client Jump Strength SignedVarInt


Update Block

Packet ID Bound To Field Name Field Type Notes
0x15 Client Coordinates BlockCoordinates
Block Runtime ID VarInt
Block Priority VarInt
Storage VarInt


Add Painting

Packet ID Bound To Field Name Field Type Notes
0x16 Client Unique Entity Id SignedVarLong
Runtime Entity Id VarLong
Coordinates BlockCoordinates
Direction SignedVarInt
Name String This is the name of the paInting (e.g. BurningSkull)

Valid values:

  • Kebab
  • Aztec
  • Alban
  • Aztec2
  • Bomb
  • Plant
  • Wasteland
  • Wanderer
  • Graham
  • Pool
  • Courbet
  • Sunset
  • Sea
  • Creebet
  • Match
  • Bust
  • Stage
  • Void
  • SkullAndRoses
  • Wither
  • Fighters
  • Skeleton
  • DonkeyKong
  • PoInter
  • Pigscene
  • BurningSkull

Tick Sync

Packet ID Bound To Field Name Field Type Notes
0x17 Server & Client Request Timestamp Boolean
Response Timestamp Boolean


Level Sound Event (1)

Packet ID Bound To Field Name Field Type Notes
0x18 Server & Client Sound ID Byte
Position Vector3
Block Id SignedVarInt
Entity Type SignedVarInt
Is baby mob Boolean
Is global Boolean


Level Event

Packet ID Bound To Field Name Field Type Notes
0x19 Client Event ID SignedVarInt
Position Vector3
Data SignedVarInt


Block Event

Packet ID Bound To Field Name Field Type Notes
0x1A Client Block Position BlockCoordinates
Event Type SignedVarInt
Event Data SignedVarInt

Entity Event

Packet ID Bound To Field Name Field Type Notes
0x1B Server & Client Runtime Entity ID VarLong
Event ID Byte
Data SignedVarInt


Mob Effect

Packet ID Bound To Field Name Field Type Notes
0x1C Client Runtime entity id VarLong
Event Byte
Effect id SignedVarInt
Amplifier SignedVarInt
Particles Boolean
Duration SignedVarInt

Events:

  • 0: None
  • 1: Add
  • 2: Modify
  • 3: Remove

Update Attributes

Packet ID Bound To Field Name Field Type Notes
0x1D Client Runtime Entity ID VarLong
Attributes PlayerAttributes


Inventory Transaction

Packet ID Bound To Field Name Field Type Notes
0x1E Server & Client Transaction Transaction


Mob Equipment

Packet ID Bound To Field Name Field Type Notes
0x1F Server & Client Runtime Entity ID VarLong
Item Item
Slot Byte
Selected Slot Byte
Windows Id Byte


Mob Armor Equipment

Packet ID Bound To Field Name Field Type Notes
0x20 Server & Client Runtime Entity ID VarLong
Helmet Item
Chestplate Item
Leggings Item
Boots Item


Interact

Packet ID Bound To Field Name Field Type Notes
0x21 Server & Client Action ID Byte
Target Runtime Entity ID VarLong


Block Pick Request

Packet ID Bound To Field Name Field Type Notes
0x22 Server Block Position X SignedVarInt
Block Position Y SignedVarInt
Block Position Z SignedVarInt
Add User Data bool Whether there should be NBT data in the picked block (activated by pressing Ctrl on default keyboard controls)
Hotbar Slot Byte

The Bedrock client sends the position of the block. It expects the server to decide the block to pick and add it to the inventory or switch the hotbar slot if needed.

Entity Pick Request

Packet ID Bound To Field Name Field Type Notes
0x23 Server Runtime Entity Id Unsigned Long
Hotbar Slot Byte


Player Action

Packet ID Bound To Field Name Field Type Notes
0x24 Server Runtime Entity ID VarLong
Action ID SignedVarInt
Coordinates BlockCoordinates
Face SignedVarInt


Entity Fall

Packet ID Bound To Field Name Field Type Notes
0x25 Server Runtime Entity Id VarLong
Fall Distance Float
In Void Boolean


Hurt Armor

Packet ID Bound To Field Name Field Type Notes
0x26 Client Health SignedVarInt


Set Entity Data

Packet ID Bound To Field Name Field Type Notes
0x27 Server & Client Runtime Entity ID VarLong
Metadata MetadataDictionary


Set Entity Motion

Packet ID Bound To Field Name Field Type Notes
0x28 Server & Client Runtime Entity Id VarLong
Motion X Vector3
Motion Y Float
Motion Z Float


Set Entity Link

Packet ID Bound To Field Name Field Type Notes
0x29 Client Ridden ID SignedVarLong
Rider ID SignedVarLong
Link Type Byte
Unknown Byte


Set Health

Packet ID Bound To Field Name Field Type Notes
0x2A Client Health SignedVarInt


Set Spawn Position

Packet ID Bound To Field Name Field Type Notes
0x2B Client Spawn Type SignedVarInt
Coordinates BlockCoordinates
Forced Boolean


Animate

Packet ID Bound To Field Name Field Type Notes
0x2C Server & Client Action ID SignedVarInt
Runtime Entity ID VarLong


Respawn

Packet ID Bound To Field Name Field Type Notes
0x2D Server & Client Position Vector3
Runtime Entity Id Byte
Runtime Entity ID VarLong

Container Open

Packet ID Bound To Field Name Field Type Notes
0x2E Client Window Id Byte
Type Byte
Block Position BlockCoordinates
Unique Entity Id SignedVarLong

Bedrock needs either a valid block position, with an actual block at that position, or an entity ID for this to work. The entity must have CONTAINER_BASE_SIZE metadata, or the block must be a container. The entity ID is used for minecart chests etc. but any entity will work. If the entity has NAMETAG metadata this will be used as the container name.

Container Close

Packet ID Bound To Field Name Field Type Notes
0x2F Server & Client Window Id Byte


Player Hotbar

Packet ID Bound To Field Name Field Type Notes
0x30 Server & Client Selected Hotbar Slot VarInt
Container Id Byte
Select Hotbar Slot Boolean


Inventory Content

Packet ID Bound To Field Name Field Type Notes
0x31 Server & Client Inventory Id VarInt
Input ItemStacks


Inventory Slot

Packet ID Bound To Field Name Field Type Notes
0x32 Server & Client Inventory Id VarInt
Slot VarInt
Item Item


Container Set Data

Packet ID Bound To Field Name Field Type Notes
0x33 Client Window Id Byte
Property SignedVarInt
Value SignedVarInt


Crafting Data

Packet ID Bound To Field Name Field Type Notes
0x34 Client Recipes Recipes
Potion type recipes PotionTypeRecipe[]
potion container recipes PotionContainerChangeRecipe[]
Is Clean Boolean


Crafting Event

Packet ID Bound To Field Name Field Type Notes
0x35 Server & Client Window ID Byte
Recipe Type SignedVarInt
Recipe ID UUID
Input ItemStacks
Result ItemStacks


Gui Data Pick Item

Packet ID Bound To Field Name Field Type Notes
0x36 Client


Adventure Settings

Packet ID Bound To Field Name Field Type Notes
0x37 Server & Client Flags VarInt
Command permission VarInt
Action permissions VarInt
Permission level VarInt
Custom stored permissions VarInt
User Id Boolean


Block Entity Data

Packet ID Bound To Field Name Field Type Notes
0x38 Server & Client Coordinates BlockCoordinates
NamedTag NBT


Player Input

Packet ID Bound To Field Name Field Type Notes
0x39 Server Motion X Float
Motion Z Float
Jumping Boolean
Sneaking Boolean


Level Chunk

Packet ID Bound To Field Name Field Type Notes
0x3A Client Chunk X SignedVarInt
Chunk Z SignedVarInt
Sub Chunk Count VarInt
Cache Enabled Boolean
Chunk Data ByteArray


Set Commands Enabled

Packet ID Bound To Field Name Field Type Notes
0x3B Client Commands enabled Boolean


Set Difficulty

Packet ID Bound To Field Name Field Type Notes
0x3C Client Difficulty VarInt


Change Dimension

Packet ID Bound To Field Name Field Type Notes
0x3D Client Dimension SignedVarInt
Position X Vector3
Position Y Boolean
Position Z Float
Respawn Boolean


Set Player Game Type

Packet ID Bound To Field Name Field Type Notes
0x3E Server & Client Game mode SignedVarInt


Player List

Packet ID Bound To Field Name Field Type Notes
0x3F Client Records PlayerRecords


Simple Event

Packet ID Bound To Field Name Field Type Notes
0x40 Client Event Type Unsigned Short


Event

Packet ID Bound To Field Name Field Type Notes
0x41 Client Runtime Entity ID VarLong
Event data SignedVarInt
Event type Byte


Spawn Experience Orb

Packet ID Bound To Field Name Field Type Notes
0x42 Client Position Vector3
Count SignedVarInt


Map Item Data

Packet ID Bound To Field Name Field Type Notes
0x43 Client MapInfo MapInfo


Map Info Request

Packet ID Bound To Field Name Field Type Notes
0x44 Server & Client Unique Map Id SignedVarLong


Request Chunk Radius

Packet ID Bound To Field Name Field Type Notes
0x45 Server & Client Chunk radius SignedVarInt


Chunk Radius Updated

Packet ID Bound To Field Name Field Type Notes
0x46 Client Chunk radius SignedVarInt


ItemFrame Drop Item

Packet ID Bound To Field Name Field Type Notes
0x47 Server & Client Block Position BlockCoordinates See note below.

According to the NukkitX Protocol, the server sends the Y coordinate divided by two, and negative if needs to be subtracted by one. Example:

   Int y;
   if (packet.getBlockPosition().getY() > 0) {
       y = packet.getBlockPosition().getY() * 2;
   } else {
       y = (packet.getBlockPosition().getY() * -2) - 1;
   }

Game Rules Changed

Packet ID Bound To Field Name Field Type Notes
0x48 Client Rules GameRules


Camera

Packet ID Bound To Field Name Field Type Notes
0x49 Client Camera Unique Entity Id SignedVarLong
Player Unique Entity Id SignedVarLong


Boss Event

Packet ID Bound To Field Name Field Type Notes
0x4A Client Boss Entity ID SignedVarLong
Event Type VarInt


Show Credits

Packet ID Bound To Field Name Field Type Notes
0x4B Client Runtime Entity ID VarLong
Status SignedVarInt


Available Commands

Packet ID Bound To Field Name Field Type Notes
0x4C Client


Command Request

Packet ID Bound To Field Name Field Type Notes
0x4D Server Command String
Command type VarInt
Unknown UUID UUID
Request ID String
Unknown Boolean


CommandBlock Update

Packet ID Bound To Field Name Field Type Notes
0x4E Server Is Block Boolean


Command Output

Packet ID Bound To Field Name Field Type Notes
0x4F Client


Update Trade

Packet ID Bound To Field Name Field Type Notes
0x50 Client Window ID Byte
Window Type Byte
Unknown0 VarInt
Unknown1 VarInt
Unknown2 VarInt
Is Willing Boolean
Trader Entity ID SignedVarLong
Player Entity ID SignedVarLong
Display Name String
NamedTag NBT


Update Equip

Packet ID Bound To Field Name Field Type Notes
0x51 Client Window ID Byte
Window Type Byte
Unknown Byte
Entity ID SignedVarLong
NamedTag NBT


Resource Pack Data Info

Packet ID Bound To Field Name Field Type Notes
0x52 Client Package ID String
Max Chunk Size Unsigned Int
Chunk Count Unsigned Int
Compressed Package Size Unsigned Long
Hash ByteArray
Is Premium Boolean
Pack Type Byte


Resource Pack Chunk Data

Packet ID Bound To Field Name Field Type Notes
0x53 Client Package ID String
Chunk Index Unsigned Int
Progress Unsigned Long
Payload ByteArray


Resource Pack Chunk Request

Packet ID Bound To Field Name Field Type Notes
0x54 Server Package ID String
Chunk Index Unsigned Int


Transfer

Packet ID Bound To Field Name Field Type Notes
0x55 Client Address String
Port Unsigned Short


Play Sound

Packet ID Bound To Field Name Field Type Notes
0x56 Client Sound name String
Sound position Position
Volume Float
Pitch Float


Stop Sound

Packet ID Bound To Field Name Field Type Notes
0x57 Client Sound Name String
Stopping All Sound Boolean


Set Title

Packet ID Bound To Field Name Field Type Notes
0x58 Client Type SignedVarInt
Text String
Fade In Time SignedVarInt
Stay Time SignedVarInt
Fade Out Time SignedVarInt


Add Behavior Tree

Packet ID Bound To Field Name Field Type Notes
0x59 Client Behavior Tree Json String


Structure Block Update

Packet ID Bound To Field Name Field Type Notes
0x5A Client


Show Store Offer

Packet ID Bound To Field Name Field Type Notes
0x5B Client Offer Id String
Shown To All Boolean


Purchase Receipt

Packet ID Bound To Field Name Field Type Notes
0x5C Server


Player Skin

Packet ID Bound To Field Name Field Type Notes
0x5D Server & Client UUID UUID
Skin Skin
Skin Name String
Old Skin Name String


Sub Client Login

Packet ID Bound To Field Name Field Type Notes
0x5E Client


Automation Client Connect

Packet ID Bound To Field Name Field Type Notes
0x5F Client Address String


Set Last Hurt By

Packet ID Bound To Field Name Field Type Notes
0x60 Client Entity Type Id VarInt


Book Edit

Packet ID Bound To Field Name Field Type Notes
0x61 Client


NPC Request

Packet ID Bound To Field Name Field Type Notes
0x62 Server & Client Runtime Entity ID VarLong
Unknown0 Byte
Unknown1 String
Unknown2 Byte

Photo Transfer

Packet ID Bound To Field Name Field Type Notes
0x63 Server File name String
Image data String
Unknown2 String


Model Form Request

Packet ID Bound To Field Name Field Type Notes
0x64 Client Form Id VarInt
Form Data String


Model Form Response

Packet ID Bound To Field Name Field Type Notes
0x65 Server Form Id VarInt
Form Data String


Server Settings Request

Packet ID Bound To Field Name Field Type Notes
0x66 Server


Server Settings Response

Packet ID Bound To Field Name Field Type Notes
0x67 Client Form Id VarLong
Form Data String


Show Profile

Packet ID Bound To Field Name Field Type Notes
0x68 Client Xuid String


Set Default Game Type

Packet ID Bound To Field Name Field Type Notes
0x69 Client Game mode VarInt


Remove Objective

Packet ID Bound To Field Name Field Type Notes
0x6A Client Objective Id String


Set Display Objective

Packet ID Bound To Field Name Field Type Notes
0x6B Client Display Slot String
Objective Id String
Display Name String
Criteria String
Sort Order SignedVarInt


Set Score

Packet ID Bound To Field Name Field Type Notes
0x6C Client Entries ScoreEntries


Lab Table

Packet ID Bound To Field Name Field Type Notes
0x6D Server & Client Unknown Byte 0 Byte
Block Entity Position X VarInt
Block Entity Position Y VarInt
Block Entity Position Z VarInt
Reaction Type Byte


Update Block Synced

Packet ID Bound To Field Name Field Type Notes
0x6E Client Coordinates BlockCoordinates
Block Runtime ID VarInt
Block Priority VarInt
Data Layer ID VarInt
Unknown0 VarLong
Unknown1 VarLong


Move Entity Delta

Packet ID Bound To Field Name Field Type Notes
0x6F Client Runtime Entity ID VarLong
Flags Unsigned Short


Set Scoreboard Identity

Packet ID Bound To Field Name Field Type Notes
0x70 Client Entries ScoreboardIdentityEntries


Set Local Player As Initialized

Packet ID Bound To Field Name Field Type Notes
0x71 Server Runtime Entity Id VarLong


Update Soft Enum

Packet ID Bound To Field Name Field Type Notes
0x72 Client


Network Stack Latency

Packet ID Bound To Field Name Field Type Notes
0x73 Server & Client Timestamp Unsigned Long
Send Back Byte


Script Custom Event

Packet ID Bound To Field Name Field Type Notes
0x75 Server & Client Event Name String
Data String


Spawn Particle Effect

Packet ID Bound To Field Name Field Type Notes
0x76 Client Dimension Id Byte
Unique Entity Id SignedVarLong
Position Vector3
Identifier String


Available Entity Identifiers

Packet ID Bound To Field Name Field Type Notes
0x77 Client NamedTag NBT


Level Sound Event (2)

Packet ID Bound To Field Name Field Type Notes
0x78 Server & Client Sound ID Byte
Position Vector3
Block Id SignedVarInt
Entity Type String
Is baby mob Boolean
Is global Boolean


Network Chunk Publisher Update

Packet ID Bound To Field Name Field Type Notes
0x79 Client Coordinates BlockCoordinates
Radius VarInt


Biome Definition List

Packet ID Bound To Field Name Field Type Notes
0x7A Client NamedTag NBT


Level Sound Event (3)

Packet ID Bound To Field Name Field Type Notes
0x7B Server & Client Sound ID VarInt
Position Vector3
Block Id SignedVarInt
Entity Type String
Is baby mob Boolean
Is global Boolean


Level Event Generic

Packet ID Bound To Field Name Field Type Notes
0x7C Client


Lectern Update

Packet ID Bound To Field Name Field Type Notes
0x7D Client Page Byte
Total Pages Byte
Block Position Position
Dropping Book Boolean


Video Stream Connect

Packet ID Bound To Field Name Field Type Notes
0x7E Client Server URI String
Frame Send Frequency Float
Action Byte
Resolution X Int
Resolution Y Int


Client Cache Status

Packet ID Bound To Field Name Field Type Notes
0x81 Server & Client Supported Boolean


On Screen Texture Animation

Packet ID Bound To Field Name Field Type Notes
0x82 Client


Map Create Locked Copy

Packet ID Bound To Field Name Field Type Notes
0x83 Client Original Map Id Boolean
New Map Id Boolean


Structure Template Data Export Request

Packet ID Bound To Field Name Field Type Notes
0x84 Client


Structure Template Data Export Response

Packet ID Bound To Field Name Field Type Notes
0x85 Client


Update Block Properties

Packet ID Bound To Field Name Field Type Notes
0x86 Client Unknown Byte
NamedTag NBT


Client Cache Blob Status

Packet ID Bound To Field Name Field Type Notes
0x87 Client


Client Cache Miss Response

Packet ID Bound To Field Name Field Type Notes
0x88 Client


Network Settings

Packet ID Bound To Field Name Field Type Notes
0x8F Client Unknown Byte
Compression threshold Short