Difference between revisions of "Pocket Minecraft Protocol"

From wiki.vg
Jump to: navigation, search
m (Automatic packets (needs info))
Line 150: Line 150:
 
| class="col1 centeralign" | byte
 
| class="col1 centeralign" | byte
 
| class="col2 centeralign" | <code>5</code>
 
| class="col2 centeralign" | <code>5</code>
| class="col3" | Currently 5
+
| class="col3" | Check the Data Packet section for the current version
 
|- class="row2"
 
|- class="row2"
 
| class="col0 centeralign" | Null Payload
 
| class="col0 centeralign" | Null Payload
Line 662: Line 662:
  
  
{{anchor|Data_Packet}}
+
== Data Packets ==
 +
 
 +
This information has been generated using [https://github.com/PocketMine/PocketBurger PocketBurger], then edited manually.
 +
 
 +
'''Minecraft: Pocket Edition v0.7.3, protocol #11'''
 +
 
 +
=== LoginPacket (0x82) ===
 +
 
 +
''Server to Client''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="5" | 0x82
 +
| a
 +
| string8
 +
|
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| c
 +
| int
 +
|
 +
|-
 +
| d
 +
| int
 +
|
 +
|-
 +
| e
 +
| string8
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== LoginStatusPacket (0x83) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0x83
 +
| a
 +
| int
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== ReadyPacket (0x84) ===
 +
 
 +
''Server to Client''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0x84
 +
| bits[8](a)
 +
| byte[]
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== MessagePacket (0x85) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0x85
 +
| a
 +
| string8
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== SetTimePacket (0x86) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0x86
 +
| a
 +
| int
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== StartGamePacket (0x87) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="7" | 0x87
 +
| a
 +
| int
 +
|
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| c
 +
| int
 +
|
 +
|-
 +
| d
 +
| int
 +
|
 +
|-
 +
| e
 +
| float
 +
|
 +
|-
 +
| f
 +
| float
 +
|
 +
|-
 +
| g
 +
| float
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== AddMobPacket (0x88) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="8" | 0x88
 +
| a
 +
| int
 +
|
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| c
 +
| float
 +
|
 +
|-
 +
| d
 +
| float
 +
|
 +
|-
 +
| e
 +
| float
 +
|
 +
|-
 +
| f.degreesToChar()
 +
| byte
 +
|
 +
|-
 +
| g.degreesToChar()
 +
| byte
 +
|
 +
|-
 +
| Metadata(h)
 +
| byte[]
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== AddPlayerPacket (0x89) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="11" | 0x89
 +
| (unsigned) a
 +
| long
 +
|
 +
|-
 +
| b
 +
| string8
 +
|
 +
|-
 +
| c
 +
| int
 +
|
 +
|-
 +
| d
 +
| float
 +
|
 +
|-
 +
| e
 +
| float
 +
|
 +
|-
 +
| f
 +
| float
 +
|
 +
|-
 +
| g.degreesToChar()
 +
| byte
 +
|
 +
|-
 +
| h.degreesToChar()
 +
| byte
 +
|
 +
|-
 +
| i
 +
| short
 +
|
 +
|-
 +
| j
 +
| short
 +
|
 +
|-
 +
| Metadata(k)
 +
| byte[]
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== RemovePlayerPacket (0x8a) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="2" | 0x8a
 +
| a
 +
| int
 +
|
 +
|-
 +
| (unsigned) b
 +
| long
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== AddEntityPacket (0x8c) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="9" | 0x8c
 +
| a
 +
| int
 +
|
 +
|-
 +
| (unsigned) b
 +
| byte
 +
|
 +
|-
 +
| c
 +
| float
 +
|
 +
|-
 +
| d
 +
| float
 +
|
 +
|-
 +
| e
 +
| float
 +
|
 +
|-
 +
| f
 +
| int
 +
|
 +
|-
 +
| g.clamp()
 +
| short
 +
|
 +
|-
 +
| h
 +
| short
 +
|
 +
|-
 +
| i
 +
| short
 +
|
 +
|-
  
== Data Packets ==
+
|}
  
=== Raw Information ===
+
=== RemoveEntityPacket (0x8d) ===
* Generated using [https://gist.github.com/4678643 this parser]
+
 
* [https://gist.github.com/shoghicp/5717436 0.7.0 & 0.7.1 protocol #11]
+
''Client to Server''
* [https://gist.github.com/shoghicp/5601589 0.6.0 & 0.6.1 protocol #9]
 
* [http://pastie.org/5981489 0.5.0 protocol]
 
* [http://pastie.org/5981490 0.4.0 protocol]
 
  
  
=== Data ID List ===
 
The Minecraft ID is the first byte of the data got in Custom Packets and parsing them.
 
All packets are found by using the tutorial posted by Jocopa3 found [http://www.minecraftforum.net/topic/1446513-mcpeserver-and-server-modding-api-in-development/page__st__100#entry18330091 here].
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col1" | Minecraft ID
+
| Packet ID
| class="col2" | Packet Name
+
| Field Name
|- class="row1"
+
| Field Type
| class="col0 centeralign" | 0x82
+
| Notes
| class="col1 centeralign" | LoginPacket
+
|-
|- class="row2"
+
| rowspan="1" | 0x8d
| class="col0 centeralign" | 0x83
+
| a
| class="col1 centeralign" | LoginStatusPacket
+
| int
|- class="row3"
+
|  
| class="col0 centeralign" | 0x84
+
|-
| class="col1 centeralign" | ReadyPacket
+
 
|- class="row4"
 
| class="col0 centeralign" | 0x85
 
| class="col1 centeralign" | MessagePacket
 
|- class="row5"
 
| class="col0 centeralign" | 0x86
 
| class="col1 centeralign" | SetTimePacket
 
|- class="row6"
 
| class="col0 centeralign" | 0x87
 
| class="col1 centeralign" | StartGamePacket
 
|- class="row7"
 
| class="col0 centeralign" | 0x88
 
| class="col1 centeralign" | AddMobPacket
 
|- class="row8"
 
| class="col0 centeralign" | 0x89
 
| class="col1 centeralign" | AddPlayerPacket
 
|- class="row9"
 
| class="col0 centeralign" | 0x8A
 
| class="col1 centeralign" | RemovePlayerPacket
 
|- class="row10"
 
| class="col0 centeralign" | 0x8C
 
| class="col1 centeralign" | AddEntityPacket
 
|- class="row11"
 
| class="col0 centeralign" | 0x8D
 
| class="col1 centeralign" | RemoveEntityPacket
 
|- class="row12"
 
| class="col0 centeralign" | 0x8E
 
| class="col1 centeralign" | AddItemEntityPacket
 
|- class="row13"
 
| class="col0 centeralign" | 0x8F
 
| class="col1 centeralign" | TakeItemEntityPacket
 
|- class="row14"
 
| class="col0 centeralign" | 0x90
 
| class="col1 centeralign" | MoveEntityPacket
 
|- class="row15"
 
| class="col0 centeralign" | 0x93
 
| class="col1 centeralign" | MoveEntityPacket_PosRot
 
|- class="row16"
 
| class="col0 centeralign" | 0x94
 
| class="col1 centeralign" | MovePlayerPacket
 
|- class="row17"
 
| class="col0 centeralign" | 0x95
 
| class="col1 centeralign" | PlaceBlockPacket
 
|- class="row18"
 
| class="col0 centeralign" | 0x96
 
| class="col1 centeralign" | RemoveBlockPacket
 
|- class="row19"
 
| class="col0 centeralign" | 0x97
 
| class="col1 centeralign" | UpdateBlockPacket
 
|- class="row20"
 
| class="col0 centeralign" | 0x98
 
| class="col1 centeralign" | AddPaintingPacket
 
|- class="row21"
 
| class="col0 centeralign" | 0x99
 
| class="col1 centeralign" | ExplodePacket
 
|- class="row22"
 
| class="col0 centeralign" | 0x9A
 
| class="col1 centeralign" | LevelEventPacket
 
|- class="row23"
 
| class="col0 centeralign" | 0x9B
 
| class="col1 centeralign" | TileEventPacket
 
|- class="row24"
 
| class="col0 centeralign" | 0x9C
 
| class="col1 centeralign" | EntityEventPacket
 
|- class="row25"
 
| class="col0 centeralign" | 0x9D
 
| class="col1 centeralign" | RequestChunkPacket
 
|- class="row26"
 
| class="col0 centeralign" | 0x9E
 
| class="col1 centeralign" | ChunkDataPacket
 
|- class="row27"
 
| class="col0 centeralign" | 0x9F
 
| class="col1 centeralign" | PlayerEquipmentPacket
 
|- class="row28"
 
| class="col0 centeralign" | 0xA0
 
| class="col1 centeralign" | Interactpacket
 
|- class="row29"
 
| class="col0 centeralign" | 0xA1
 
| class="col1 centeralign" | UseItemPacket
 
|- class="row30"
 
| class="col0 centeralign" | 0xA2
 
| class="col1 centeralign" | PlayerActionPacket
 
|- class="row31"
 
| class="col0 centeralign" | 0xA3
 
| class="col1 centeralign" | SetEntityDataPacket
 
|- class="row32"
 
| class="col0 centeralign" | 0xA4
 
| class="col1 centeralign" | SetEntityMotionPacket
 
|- class="row33"
 
| class="col0 centeralign" | 0xA5
 
| class="col1 centeralign" | SetHealthPacket
 
|- class="row34"
 
| class="col0 centeralign" | 0xA6
 
| class="col1 centeralign" | SetSpawnPositionPacket
 
|- class="row35"
 
| class="col0 centeralign" | 0xA7
 
| class="col1 centeralign" | AnimatePacket
 
|- class="row36"
 
| class="col0 centeralign" | 0xA8
 
| class="col1 centeralign" | RespawnPacket
 
|- class="row37"
 
| class="col0 centeralign" | 0xA9
 
| class="col1 centeralign" | Packet::Packet(void) †
 
|- class="row38"
 
| class="col0 centeralign" | 0xAA
 
| class="col1 centeralign" | DropItemPacket
 
|- class="row39"
 
| class="col0 centeralign" | 0xAB
 
| class="col1 centeralign" | ContainerOpenPacket
 
|- class="row40"
 
| class="col0 centeralign" | 0xAC
 
| class="col1 centeralign" | ContainerClosePacket
 
|- class="row41"
 
| class="col0 centeralign" | 0xAD
 
| class="col1 centeralign" | ContainerSetSlotPacket
 
|- class="row42"
 
| class="col0 centeralign" | 0xAE
 
| class="col1 centeralign" | ContainerSetDataPacket
 
|- class="row43"
 
| class="col0 centeralign" | 0xAF
 
| class="col1 centeralign" | ContainerSetContentPacket
 
|- class="row44"
 
| class="col0 centeralign" | 0xB0
 
| class="col1 centeralign" | ContainerAckPacket
 
|- class="row45"
 
| class="col0 centeralign" | 0xB1
 
| class="col1 centeralign" | ChatPacket
 
|- class="row46"
 
| class="col0 centeralign" | 0xB2
 
| class="col1 centeralign" | SignUpdatePacket
 
|- class="row47"
 
| class="col0 centeralign" | 0xB3
 
| class="col1 centeralign" | AdventureSettingsPacket
 
|- class="row48"
 
| class="col0 centeralign" colspan="3" | Total: 47 Packets
 
 
|}
 
|}
† Packet exists but the Assembly shows no further code for it (Blank Packet?).
 
  
=== ClientConnect (0x09) ===
+
=== AddItemEntityPacket (0x8e) ===
 +
 
 
''Client to Server''
 
''Client to Server''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="10" | 0x8e
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x09</code>
+
| int
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Client ID
+
| b
| class="col1 centeralign" | 8 bytes
+
| short
| class="col2 centeralign" | <code>0xffffffffb287d2a5</code>
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| (unsigned) c
| class="col0 centeralign" | Unknown
+
| byte
| class="col1 centeralign" | 5 bytes
+
|  
| class="col2 centeralign" | <code>0x0000000000</code>
+
|-
| class="col3" |
+
| d
|- class="row3"
+
| short
| class="col0 centeralign" | Session
+
|  
| class="col1 centeralign" | 4 bytes
+
|-
| class="col2 centeralign" | <code>0x000002fc</code>
+
| e
| class="col3" |
+
| float
|- class="row4"
+
|  
| class="col0" | Total Size:
+
|-
| class="col1 rightalign" colspan="4" | 18 Bytes
+
| f
 +
| float
 +
|  
 +
|-
 +
| g
 +
| float
 +
|  
 +
|-
 +
| h
 +
| byte
 +
|  
 +
|-
 +
| i
 +
| byte
 +
|  
 +
|-
 +
| j
 +
| byte
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
 +
=== TakeItemEntityPacket (0x8f) ===
  
=== Disconnect (0x15) ===
+
''Client to Server''
''Two-Ways''
 
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="2" | 0x8f
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x15</code>
+
| int
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0" | Total Size:
+
| b
| class="col1 rightalign" colspan="4" | 1 byte
+
| int
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
=== LoginPacket (0x82) ===
+
=== MoveEntityPacket (0x90) ===
 +
 
 
''Client to Server''
 
''Client to Server''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="0" | 0x90
| class="col1 centeralign" | byte
+
 
| class="col2 centeralign" | <code>0x82</code>
+
|}
| class="col3" |
+
 
|- class="row2"
+
=== MoveEntityPacket_PosRot (0x93) ===
| class="col0 centeralign" | Name length
+
 
| class="col1 centeralign" | short
+
''None''
| class="col2 centeralign" | <code>0x0006</code>
+
 
| class="col3" |
+
 
|- class="row3"
+
{| class="wikitable"
| class="col0 centeralign" | Name
+
|-
| class="col1 centeralign" | string
+
| Packet ID
| class="col2 centeralign" | Stevie
+
| Field Name
| class="col3" |
+
| Field Type
|- class="row4"
+
| Notes
| class="col0 centeralign" | Int
+
|-
| class="col1 centeralign" | int32
+
| rowspan="6" | 0x93
| class="col2 centeralign" | <code>0x00000007</code>
+
| a
| class="col3" |
+
| int
|- class="row5"
+
|
| class="col0 centeralign" | Int
+
|-
| class="col1 centeralign" | int32
+
| b
| class="col2 centeralign" | <code>0x00000007</code>
+
| float
| class="col3" |
+
|
|- class="row8"
+
|-
| class="col0" | Total Size:
+
| c
| class="col1 rightalign" colspan="4" | 11 Bytes + Name length
+
| float
 +
|
 +
|-
 +
| d
 +
| float
 +
|  
 +
|-
 +
| e
 +
| float
 +
|  
 +
|-
 +
| f
 +
| float
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== MovePlayerPacket (0x94) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="6" | 0x94
 +
| a
 +
| int
 +
|
 +
|-
 +
| b
 +
| float
 +
|
 +
|-
 +
| c
 +
| float
 +
|
 +
|-
 +
| d
 +
| float
 +
|
 +
|-
 +
| e
 +
| float
 +
|
 +
|-
 +
| f
 +
| float
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== PlaceBlockPacket (0x95) ===
 +
 
 +
''None''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="7" | 0x95
 +
| a
 +
| int
 +
|  
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| c
 +
| int
 +
|  
 +
|-
 +
| (unsigned) d
 +
| byte
 +
|  
 +
|-
 +
| (unsigned) e
 +
| byte
 +
|  
 +
|-
 +
| (unsigned) f
 +
| byte
 +
|  
 +
|-
 +
| (unsigned) g
 +
| byte
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
=== LoginStatusPacket (0x83) ===
+
=== RemoveBlockPacket (0x96) ===
 +
 
 
''Server to Client''
 
''Server to Client''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="4" | 0x96
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x83</code>
+
| int
| class="col3" |
+
|
|- class="row2"
+
|-
| class="col0 centeralign" | Status
+
| b
| class="col1 centeralign" | int32
+
| int
| class="col2 centeralign" | <code>0x00000000</code>
+
|
| class="col3" |
+
|-
|- class="row3"
+
| c
| class="col0" | Total Size:
+
| int
| class="col1 rightalign" colspan="4" | 5 Bytes
+
|
 +
|-
 +
| (unsigned) d
 +
| byte
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== UpdateBlockPacket (0x97) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="5" | 0x97
 +
| a
 +
| int
 +
|
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| (unsigned) c
 +
| byte
 +
|
 +
|-
 +
| (unsigned) d
 +
| byte
 +
|
 +
|-
 +
| (unsigned) e
 +
| byte
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== AddPaintingPacket (0x98) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="6" | 0x98
 +
| a
 +
| int
 +
|  
 +
|-
 +
| b
 +
| int
 +
|
 +
|-
 +
| c
 +
| int
 +
|
 +
|-
 +
| d
 +
| int
 +
|
 +
|-
 +
| e
 +
| int
 +
|
 +
|-
 +
| f
 +
| string8
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
=== ExplodePacket (0x99) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="8" | 0x99
 +
| a
 +
| float
 +
|
 +
|-
 +
| b
 +
| float
 +
|
 +
|-
 +
| c
 +
| float
 +
|
 +
|-
 +
| d
 +
| float
 +
|
 +
|-
 +
| e
 +
| int
 +
|
 +
|-
 +
| f
 +
| byte
 +
|
 +
|-
 +
| g
 +
| byte
 +
|  
 +
|-
 +
| h
 +
| byte
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== LevelEventPacket (0x9a) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="5" | 0x9a
 +
| a
 +
| short
 +
|
 +
|-
 +
| b
 +
| short
 +
|
 +
|-
 +
| c
 +
| short
 +
|
 +
|-
 +
| d
 +
| short
 +
|
 +
|-
 +
| e
 +
| int
 +
|
 +
|-
 +
 
 
|}
 
|}
  
=== ReadyPacket (0x84) ===
+
=== TileEventPacket (0x9b) ===
 +
 
 
''Client to Server''
 
''Client to Server''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="5" | 0x9b
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x84</code>
+
| int
| class="col3" |
+
|
|- class="row2"
+
|-
| class="col0 centeralign" | Byte
+
| b
| class="col1 centeralign" | byte
+
| int
| class="col2 centeralign" | <code>0x01</code>
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| c
| class="col0" | Total Size:
+
| int
| class="col1 rightalign" colspan="4" | 2 Bytes
+
|
 +
|-
 +
| d
 +
| int
 +
|  
 +
|-
 +
| e
 +
| int
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== EntityEventPacket (0x9c) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="2" | 0x9c
 +
| a
 +
| int
 +
|  
 +
|-
 +
| (unsigned) b
 +
| byte
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
 +
=== RequestChunkPacket (0x9d) ===
  
=== StartGamePacket (0x87) ===
 
 
''Server to Client''
 
''Server to Client''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="2" | 0x9d
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x87</code>
+
| int
| class="col3" |
+
|
|- class="row2"
+
|-
| class="col0 centeralign" | Seed
+
| b
| class="col1 centeralign" | int32
+
| int
| class="col2 centeralign" | <code>0x00000194</code>
+
|  
| class="col3" |
+
|-
|- class="row3"
+
 
| class="col0 centeralign" | Unknown
+
|}
| class="col1 centeralign" | int32
+
 
| class="col2 centeralign" | <code>0x00000000</code>
+
=== ChunkDataPacket (0x9e) ===
| class="col3" |
+
 
|- class="row4"
+
''Client to Server''
| class="col0 centeralign" | Gamemode
+
 
| class="col1 centeralign" | int32
+
 
| class="col2 centeralign" | <code>0x00000001</code>
+
{| class="wikitable"
| class="col3" |
+
|-
|- class="row5"
+
| Packet ID
| class="col0 centeralign" | Entity ID
+
| Field Name
| class="col1 centeralign" | int32
+
| Field Type
| class="col2 centeralign" | <code>0x00000017</code>
+
| Notes
| class="col3" |
+
|-
|- class="row6"
+
| rowspan="5" | 0x9e
| class="col0 centeralign" | X
+
| a
| class="col1 centeralign" | float
+
| int
| class="col2 centeralign" | <code>0x43008000</code>
+
|
| class="col3" |
+
|-
|- class="row7"
+
| b
| class="col0 centeralign" | Y
+
| int
| class="col1 centeralign" | float
+
|  
| class="col2 centeralign" | <code>0x42820000</code>
+
|-
| class="col3" |
+
| (unsigned) c
|- class="row8"
+
| byte
| class="col0 centeralign" | Z
+
|
| class="col1 centeralign" | float
+
|-
| class="col2 centeralign" | <code>0x43008000</code>
+
| d
| class="col3" |
+
| byte[]
|- class="row9"
+
|  
| class="col0" | Total Size:
+
|-
| class="col1 rightalign" colspan="4" | 29 Bytes
+
| e
 +
| byte[]
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== PlayerEquipmentPacket (0x9f) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="4" | 0x9f
 +
| a
 +
| int
 +
|  
 +
|-
 +
| (unsigned) b
 +
| short
 +
|
 +
|-
 +
| (unsigned) c
 +
| short
 +
|  
 +
|-
 +
| d
 +
| byte
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== PlayerArmorEquipmentPacket (0xa0) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="5" | 0xa0
 +
| a
 +
| int
 +
|
 +
|-
 +
| b
 +
| byte
 +
|  
 +
|-
 +
| c
 +
| byte
 +
|
 +
|-
 +
| d
 +
| byte
 +
|  
 +
|-
 +
| e
 +
| byte
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== InteractPacket (0xa1) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="3" | 0xa1
 +
| bits[8](a)
 +
| byte[]
 +
|  
 +
|-
 +
| b
 +
| int
 +
|  
 +
|-
 +
| c
 +
| int
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
=== AddEntityPacket (0x8C) ===
+
=== UseItemPacket (0xa2) ===
 +
 
 
''Server to Client''
 
''Server to Client''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="13" | 0xa2
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x8C</code>
+
| int
| class="col3 centeralign" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Bytes
+
| b
| class="col1 centeralign" | byte
+
| int
| class="col2 centeralign" |  
+
|  
| class="col3 centeralign" |  
+
|-
|- class="row3"
+
| c
| class="col0 centeralign" | Integer
+
| int
| class="col1 centeralign" | integer
+
|  
| class="col2 centeralign" |  
+
|-
| class="col3" |
+
| d
|- class="row4"
+
| int
| class="col0 centeralign" | Bytes
+
|  
| class="col1 centeralign" | byte
+
|-
| class="col2 centeralign" |
+
| bits[16](e).reverseBytes()
| class="col3" |
+
| byte[]
|- class="row5"
+
|  
| class="col0 centeralign" | X
+
|-
| class="col1 centeralign" | float
+
| (unsigned) f
| class="col2 centeralign" |
+
| byte
| class="col3" |
+
|  
|- class="row6"
+
|-
| class="col0 centeralign" | Y
+
| g
| class="col1 centeralign" | float
+
| int
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row7"
+
| h
| class="col0 centeralign" | Z
+
| float
| class="col1 centeralign" | float
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
| i
|- class="row8"
+
| float
| class="col0 centeralign" | Integer
+
|  
| class="col1 centeralign" | integer
+
|-
| class="col2 centeralign" |  
+
| j
| class="col3" centeralign" | World?
+
| float
|- class="row9"
+
|  
| class="col0 centeralign" | Short
+
|-
| class="col1 centeralign" | short
+
| k
| class="col2 centeralign" |  
+
| float
| class="col3" centeralign" | Motion?
+
|  
|- class="row10"
+
|-
| class="col0 centeralign" | Short
+
| l
| class="col1 centeralign" | short
+
| float
| class="col2" |
+
|  
| class="col3" centeralign" | Motion?
+
|-
|- class="row11"
+
| m
| class="col0 centeralign" | Short
+
| float
| class="col1 centeralign" | short
+
|  
| class="col2" |
+
|-
| class="col3" centeralign" | Motion?
+
 
|- class="row12"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | ? Bytes
 
 
|}
 
|}
  
=== AddItemEntityPacket (0x8E) ===
+
=== PlayerActionPacket (0xa3) ===
 +
 
 
''Server to Client''
 
''Server to Client''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="6" | 0xa3
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x8E</code>
+
| int
| class="col3 centeralign" |  
+
|
|- class="row2"
+
|-
| class="col0 centeralign" | Entity ID?
+
| b
| class="col1 centeralign" | integer
+
| int
| class="col2 centeralign" |  
+
|
| class="col3" |
+
|-
|- class="row3"
+
| c
| class="col0 centeralign" | Item ID
+
| int
| class="col1 centeralign" | short
+
|  
| class="col2 centeralign" |  
+
|-
| class="col3" |
+
| d
|- class="row4"
+
| int
| class="col0 centeralign" | Stack Size
+
|
| class="col1 centeralign" | byte
+
|-
| class="col2 centeralign" |  
+
| e
| class="col3" |
+
| int
|- class="row5"
+
|  
| class="col0 centeralign" | Item Data
+
|-
| class="col1 centeralign" | short
+
| f
| class="col2 centeralign" |  
+
| int
| class="col3" |
+
|  
|- class="row6"
+
|-
| class="col0 centeralign" | X
+
 
| class="col1 centeralign" | float
+
|}
| class="col2 centeralign" |  
+
 
| class="col3" |
+
=== HurtArmorPacket (0xa5) ===
|- class="row7"
+
 
| class="col0 centeralign" | Y
+
''Client to Server''
| class="col1 centeralign" | float
+
 
| class="col2 centeralign" |  
+
 
| class="col3 centeralign" |  
+
{| class="wikitable"
|- class="row8"
+
|-
| class="col0 centeralign" | Z
+
| Packet ID
| class="col1 centeralign" | float
+
| Field Name
| class="col2 centeralign" |  
+
| Field Type
| class="col3 centeralign" |  
+
| Notes
|- class="row9"
+
|-
| class="col0 centeralign" | Yaw
+
| rowspan="1" | 0xa5
| class="col1 centeralign" | byte
+
| a
| class="col2" |
+
| byte
| class="col3 centeralign" |
+
|  
|- class="row10"
+
|-
| class="col0 centeralign" | Pitch
+
 
| class="col1 centeralign" | byte
+
|}
| class="col2" |
+
 
| class="col3 centeralign" |
+
=== SetEntityDataPacket (0xa6) ===
|- class="row11"
+
 
| class="col0 centeralign" | Roll
+
''Client to Server''
| class="col1 centeralign" | byte
+
 
| class="col2" |
+
 
| class="col3 centeralign" |
+
{| class="wikitable"
|- class="row12"
+
|-
| class="col0" | Total Size:
+
| Packet ID
| class="col1 rightalign" colspan="4" | 25 Bytes
+
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="2" | 0xa6
 +
| a
 +
| int
 +
|
 +
|-
 +
| Metadata(b)
 +
| byte[]
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== SetEntityMotionPacket (0xa7) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="5" | 0xa7
 +
| (unsigned) a.clamp()
 +
| byte
 +
|  
 +
|-
 +
| b
 +
| int
 +
|  
 +
|-
 +
| c
 +
| short
 +
|
 +
|-
 +
| d
 +
| short
 +
|  
 +
|-
 +
| e
 +
| short
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== SetRidingPacket (0xa8) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="2" | 0xa8
 +
| a
 +
| int
 +
|  
 +
|-
 +
| b
 +
| int
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== SetHealthPacket (0xa9) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0xa9
 +
| a
 +
| byte
 +
|  
 +
|-
 +
 
 +
|}
 +
 
 +
=== SetSpawnPositionPacket (0xaa) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="3" | 0xaa
 +
| a
 +
| int
 +
|  
 +
|-
 +
| b
 +
| int
 +
|  
 +
|-
 +
| (unsigned) c
 +
| byte
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
=== TakeItemEntityPacket (0x8F) ===
+
=== AnimatePacket (0xab) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="2" | 0xab
| class="col1 centeralign" | byte
+
| bits[8](a)
| class="col2 centeralign" | <code>0x8F</code>
+
| byte[]
| class="col3 centeralign" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Collector Entity ID?
+
| b
| class="col1 centeralign" | int32
+
| int
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
 
| class="col0 centeralign" | Item Entity ID?
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row4"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 9 Bytes
 
 
|}
 
|}
  
=== MoveEntityPacket_PosRot (0x93) ===
+
=== RespawnPacket (0xac) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row3"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="4" | 0xac
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x93</code>
+
| int
| class="col3" |
+
|  
|- class="row4"
+
|-
| class="col0 centeralign" | Entity ID
+
| b
| class="col1 centeralign" | int32
+
| float
| class="col2 centeralign" | <code>0x0000</code>
+
|  
| class="col3" |
+
|-
|- class="row5"
+
| c
| class="col0 centeralign" | X
+
| float
| class="col1 centeralign" | float
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
| d
|- class="row6"
+
| float
| class="col0 centeralign" | Y
+
|  
| class="col1 centeralign" | float
+
|-
| class="col2 centeralign" |
+
 
| class="col3" |
 
|- class="row7"
 
| class="col0 centeralign" | Z
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row8"
 
| class="col0 centeralign" | Yaw
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row9"
 
| class="col0 centeralign" | Pitch
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row10"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 25 Bytes
 
 
|}
 
|}
  
=== MovePlayerPacket (0x94) ===
+
=== SendInventoryPacket (0xad) ===
''Two-Ways''
+
 
 +
''None''
 +
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row3"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="5" | 0xad
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x94</code>
+
| int
| class="col3" |
+
|  
|- class="row4"
+
|-
| class="col0 centeralign" | Entity ID
+
| (unsigned) b
| class="col1 centeralign" | int32
+
| byte
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row5"
+
| c
| class="col0 centeralign" | X
+
| short
| class="col1 centeralign" | float
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
| Item(d)
|- class="row6"
+
| byte[]
| class="col0 centeralign" | Y
+
|  
| class="col1 centeralign" | float
+
|-
| class="col2 centeralign" |
+
| Item(e)
| class="col3" |
+
| byte[]
|- class="row7"
+
|  
| class="col0 centeralign" | Z
+
|-
| class="col1 centeralign" | float
+
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row8"
 
| class="col0 centeralign" | Yaw
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row9"
 
| class="col0 centeralign" | Pitch
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row10"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 31 Bytes
 
 
|}
 
|}
  
The client sends position updates through this packet.
+
=== DropItemPacket (0xae) ===
You can also teleport the client by sending this packet.
+
 
 +
''Server to Client''
 +
 
  
=== PlaceBlockPacket (0x95) ===
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="3" | 0xae
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0x95</code>
+
| int
| class="col3 centeralign" |  
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Entity ID
+
| (unsigned) b
| class="col1 centeralign" | int32
+
| byte
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| Item(c)
| class="col0 centeralign" | X
+
| byte[]
| class="col1 centeralign" | float
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
 
|- class="row4"
 
| class="col0 centeralign" | Y
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row5"
 
| class="col0 centeralign" | X
 
| class="col1 centeralign" | float
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row6"
 
| class="col0 centeralign" | Block ID
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row7"
 
| class="col0 centeralign" | Meta
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row8"
 
| class="col0 centeralign" | Face
 
| class="col1 centeralign" | Byte
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row9"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 16 Bytes
 
 
|}
 
|}
  
=== RemoveBlockPacket (0x96) ===
+
=== ContainerOpenPacket (0xaf) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="4" | 0xaf
| class="col1 centeralign" | byte
+
| (unsigned) a
| class="col2 centeralign" | <code>0x96</code>
+
| byte
| class="col3 centeralign" |  
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Entity ID
+
| (unsigned) b
| class="col1 centeralign" | int32
+
| byte
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| (unsigned) c
| class="col0 centeralign" | X
+
| byte
| class="col1 centeralign" | int32
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
| d
|- class="row4"
+
| string8
| class="col0 centeralign" | Z
+
|  
| class="col1 centeralign" | int32
+
|-
| class="col2 centeralign" |
+
 
| class="col3" |
 
|- class="row5"
 
| class="col0 centeralign" | Y
 
| class="col1 centeralign" | byte
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row6"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 14 Bytes
 
 
|}
 
|}
  
=== TileEventPacket (0x9B) ===
+
=== ContainerClosePacket (0xb0) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="1" | 0xb0
| class="col1 centeralign" | byte
+
| (unsigned) a
| class="col2 centeralign" | <code>0x9B</code>
+
| byte
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Int
+
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row3"
 
| class="col0 centeralign" | Int
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row4"
 
| class="col0 centeralign" | Int
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row5"
 
| class="col0 centeralign" | Int
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row6"
 
| class="col0 centeralign" | Int
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row7"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 21 Bytes
 
 
|}
 
|}
  
=== EntityEventPacket (0x9C) ===
+
=== ContainerSetSlotPacket (0xb1) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="3" | 0xb1
| class="col1 centeralign" | byte
+
| bits[8](a)
| class="col2 centeralign" | <code>0x9C</code>
+
| byte[]
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Int
+
| bits[16](b).reverseBytes()
| class="col1 centeralign" | int32
+
| byte[]
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| Item(c)
| class="col0 centeralign" | Int
+
| byte[]
| class="col1 centeralign" | int32
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
 
|- class="row4"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 9 Bytes
 
 
|}
 
|}
  
=== RequestChunkPacket (0x9D) ===
+
=== ContainerSetDataPacket (0xb2) ===
 +
 
 
''Client to Server''
 
''Client to Server''
  
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="3" | 0xb2
| class="col1 centeralign" | byte
+
| (unsigned) a
| class="col2 centeralign" | <code>0x9D</code>
+
| byte
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | X
+
| b
| class="col1 centeralign" | int32
+
| short
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| c
| class="col0 centeralign" | Z
+
| short
| class="col1 centeralign" | int32
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
 
|- class="row4"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 9 Bytes
 
 
|}
 
|}
  
=== ChunkDataPacket (0x9E) ===
+
=== ContainerSetContentPacket (0xb3) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="3" | 0xb3
| class="col1 centeralign" | byte
+
| (unsigned) a
| class="col2 centeralign" | <code>0x9E</code>
+
| byte
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | X
+
| b
| class="col1 centeralign" | int32
+
| short
| class="col2 centeralign" |
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| Item(c)
| class="col0 centeralign" | Z
+
| byte[]
| class="col1 centeralign" | int32
+
|  
| class="col2 centeralign" |
+
|-
| class="col3" |
+
 
|- class="row4"
 
| class="col0 centeralign" | Chunk Data payload
 
| class="col1 centeralign" | bytes
 
| class="col2 centeralign" | <code>0x10080808...</code>
 
| class="col3" |
 
|- class="row5"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 9 Bytes + payload
 
 
|}
 
|}
  
=== PlayerEquipmentPacket (0x9F) ===
+
=== ContainerAckPacket (0xb4) ===
 +
 
 +
''None''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="2" | 0xb4
| class="col1 centeralign" | byte
+
| (unsigned) a
| class="col2 centeralign" | <code>0x9F</code>
+
| byte
| class="col3" |
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Entity ID
+
| b
| class="col1 centeralign" | int32
+
| short
| class="col2 centeralign" | <code>0</code>
+
|  
| class="col3" |
+
|-
|- class="row3"
+
 
| class="col0 centeralign" | Block/Item ID
 
| class="col1 centeralign" | short
 
| class="col2 centeralign" | <code>0x0144</code>
 
| class="col3" |
 
|- class="row4"
 
| class="col0 centeralign" | Block/Item metadata
 
| class="col1 centeralign" | short
 
| class="col2 centeralign" | <code>0x0001</code>
 
| class="col3" | See below
 
|- class="row5"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 15 Bytes
 
 
|}
 
|}
  
=== SetEntityMotionPacket (0xA4) ===
+
=== ChatPacket (0xb5) ===
 +
 
 +
''Client to Server''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="1" | 0xb5
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0xA4</code>
+
| string8
| class="col3" |
+
|  
|- class="row5"
+
|-
| class="col0 centeralign" | Entity ID
+
 
| class="col1 centeralign" | int32
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row6"
 
| class="col0 centeralign" | X Motion
 
| class="col1 centeralign" | short
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row7"
 
| class="col0 centeralign" | Y Motion
 
| class="col1 centeralign" | short
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row8"
 
| class="col0 centeralign" | Z Motion
 
| class="col1 centeralign" | short
 
| class="col2 centeralign" |
 
| class="col3" |
 
|- class="row9"
 
| class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 11 Bytes
 
 
|}
 
|}
  
=== SetHealthPacket (0xA5) ===
+
=== SignUpdatePacket (0xb6) ===
 +
 
 +
''Two-Way''
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Field Name
+
| Packet ID
| class="col1" | Field Type
+
| Field Name
| class="col2" | Example
+
| Field Type
| class="col3" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" | Minecraft ID
+
| rowspan="4" | 0xb6
| class="col1 centeralign" | byte
+
| a
| class="col2 centeralign" | <code>0xA5</code>
+
| short
| class="col3 centeralign" |  
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Health
+
| (unsigned) b
| class="col1 centeralign" | byte
+
| byte
| class="col2 centeralign" | <code>0x14</code>
+
|  
| class="col3" |
+
|-
|- class="row3"
+
| c
| class="col0" | Total Size:
+
| short
| class="col1 rightalign" colspan="4" | 2 Bytes
+
|  
 +
|-
 +
| d
 +
| string8
 +
|  
 +
|-
 +
 
 
|}
 
|}
  
== Packet Dumps ==
+
=== AdventureSettingsPacket (0xb7) ===
Due to the lack of information about the protocol, packet dumps are welcome. You can also post here pcap files of Client <-> Server sessions
+
 
 +
''Client to Server''
 +
 
 +
 
 +
{| class="wikitable"
 +
|-
 +
| Packet ID
 +
| Field Name
 +
| Field Type
 +
| Notes
 +
|-
 +
| rowspan="1" | 0xb7
 +
| bits[32](a).reverseBytes()
 +
| byte[]
 +
|
 +
|-
 +
 
 +
|}
  
* [https://gist.github.com/3928612 Partial Custom Client server connection]
 
* [https://gist.github.com/3928624 Partial Custom Server client info + connection]
 
* [http://www.cloudshark.org/captures/5e9ee11bb05a Full Client / Server Communication]. PCAP, including server search. [http://www.mediafire.com/?768jwkj3orkp7tt download]
 
  
  
 
[[Category:Pocket Minecraft]]
 
[[Category:Pocket Minecraft]]

Revision as of 16:47, 18 August 2013

Unlike the Minecraft protocol, this protocol uses UDP with (so far observed, at least) one message per packet. This makes the protocol easier to work with when it comes to packet serialization, and might offer latency improvements, but will inevitably have the usual UDP issues (packets lost, truncated, duplicated, out-of-order, etc.).

Servers listen on UDP ports 19132-19135.

Clients don't pick any specific port to listen on.


Please note that even where packet field names are written in this page, these are still largely hypothetical and could well be incorrect guesses. Some packets are fixed to the RakNet protocol, and will be marked as "RakNet Packet", which means that these packets will not change on future versions.

It has been determined that PM uses RakNet for its networking library, some documentation that seems relevant.


Contents

Terminology

PM
Pocket Minecraft (aka Minecraft PE or Minecraft Pocket Edition)

Types

Size Range Notes
byte 1 -128 to 127 Signed, two's complement
short 2 -32768 to 32767 Signed, two's complement
int32 4 -2147483648 to 2147483647 Signed, two's complement
int64 8 Maybe a double?
MAGIC 16 0x00ffff00fefefefefdfdfdfd12345678 always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID
string = 1 N/A Prefixed by a short containing the length of the string in characters. It appears that only the following ASCII characters can be displayed: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Packets

All packets start with a single byte that identifies the packet type, the rest of the packet follows it.


ID_CONNECTED_PING_OPEN_CONNECTIONS (0x01)

Client to Broadcast


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x01 Ping ID int64 0x00000000003c6d0d Time since start in Milliseconds
MAGIC MAGIC
Total Size: 25 Bytes

Clients start out by sending this packet to the IP broadcast address on port 19132 repeatedly (approx once per second) when joining a server was chosen on the main screen, and stops when the user selects a server (or leaves the screen). The ping ID from the client increases over time, and appears to be the number of milliseconds since the client program was started (might be used to measure server response latency).


ID_UNCONNECTED_PING_OPEN_CONNECTIONS (0x02)

Client to Broadcast


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x02 Ping ID int64 0x00000000003c6d0d Time since start in Milliseconds
MAGIC MAGIC
Total Size: 25 Bytes

Same as ID_CONNECTED_PING_OPEN_CONNECTIONS (0x01), but with the Packet ID changed.


ID_OPEN_CONNECTION_REQUEST_1 (0x05)

Client to Server


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x05 MAGIC MAGIC
Protocol Version byte 5 Check the Data Packet section for the current version
Null Payload many 0x00 bytes 0x00 * 1447 MTU (Maximum Transport Unit)
Total Size: 18 Bytes + length of Null Payload

If the version is different than yours, reply with a ID_INCOMPATIBLE_PROTOCOL_VERSION (0x1A)

Sent from client after it receives packet 0x1d. The client will repeatedly send this with reducing sizes until it successfully receives a reply. Observed behaviour is that the client will send packets ~0.5s apart in the following way, until it gets a 0x06 response packet, or reaches the end of these:

  • 4 packets of Null Payload length of 1447
  • 4 packets of Null Payload length of 1155
  • 5 packets of Null Payload length of 531

If the server doesnt't reply the client, the client will display a "Connect Error" window


ID_OPEN_CONNECTION_REPLY_1 (0x06)

Server to Client


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x06 MAGIC MAGIC
Server ID int64 0x00000000372cdc9e This value seems to be constant for an installation of PM, or differs between the demo and full version.
Server Security byte 0 Always 0
MTU Size short 1447 length of 0x05. Used to determine packet loss and max UDP packet size (MTU)
Total Size: 28 Bytes

Sent from server after it receives packet 0x05.


ID_OPEN_CONNECTION_REQUEST_2 (0x07)

Client to Server


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x07 MAGIC MAGIC
Security + Cookie 1 + 4 bytes 0x043f57fefd Unused, constant value
Server UDP Port short 19132
MTU Size short 1464
Client ID int64 0x00000000372cdc9e The Client / Server ID will be the same for a given device
Total Size: 34 Bytes

Sent from client in response to packet 0x06.


ID_OPEN_CONNECTION_REPLY_2 (0x08)

Server to Client


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x08 MAGIC MAGIC
Server ID int64 0x00000000372cdc9e
Client UDP Port short 46946
MTU Size short 1464
Security byte 0 Always 0
Total Size: 30 Bytes

Sent from server in response to packet 0x07.


ID_INCOMPATIBLE_PROTOCOL_VERSION (0x1A)

Server to Client


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x1A Protocol Version byte 5
MAGIC MAGIC
Server ID int64 0x00000000372cdc9e
Total Size: 26 Bytes


ID_UNCONNECTED_PING_OPEN_CONNECTIONS (0x1C)

Server to Client


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x1C Ping ID int64 0x00000000003c6d0d Time since start in Milliseconds
Server ID int64 0x00000000372cdc9e
MAGIC MAGIC
Identifier string MCCPP;Demo;Steve
Total Size: 46 Bytes + Server name length

Server sends this packet in response to a 0x02 packet. Depends of the version to send a 0x1D or a 0x1C If the Server is invisible, this packet will be sent without username

Minecraft Pocket Edition v0.5.0.0 introduced another identifier special for Minecon 2012 "MCCPP;MINECON;". This will show a Minecon logo in front of the server name, and the color of the name is changed to blue.


ID_ADVERTISE_SYSTEM (0x1D)

Server to Client


RakNet Packet

Packet ID Field Name Field Type Example Notes
0x1D Ping ID int64 0x00000000003c6d0d Time since start in Milliseconds
Server ID int64 0x00000000372cdc9e
MAGIC MAGIC
Data string MCCPP;Demo;Steve Used to send the username (MCCPP;Demo; + username)
Total Size: 35 Bytes + length of string

Same as ID_UNCONNECTED_PING_OPEN_CONNECTIONS (0x1C), but with the Packet ID changed. Depends of the version to send a 0x1D or a 0x1C


Custom Packet (0x80-0x8F)

Two-Way

This packet is part of the real Minecraft PE implementation. The structure can change anytime.

Packet ID Field Name Field Type Example Notes
0x80-0x8F Count 3 bytes 0 Increments once every packet.
Data payload 0x40009000000009... Uses Packet Encapsulation format
Total Size: 6 Bytes + payload

The receiver will use the Packet number in the 0xC0 packet and send it back.


NACK (0xA0)

Two-Way

This packet is part of the real Minecraft PE implementation. The structure can change anytime.

Packet ID Field Name Field Type Example Notes
0xN0 Unknown short 1
Additional Packet boolean true true when there is only one packet received
Packet Number 3 bytes 0x000000 Packet to resend
Packet Number #2 3 bytes 0x000004 Aditional packet to resend (only when false)
Total Size: 7 or 10 Bytes

Send these when a packet was lost, or reply to this resending the lost packet.

ACK (0xC0)

Two-Way

This packet is part of the real Minecraft PE implementation. The structure can change anytime.

Packet ID Field Name Field Type Example Notes
0xC0 Unknown short 1
Additional Packet boolean true true when there is only one packet received
Packet Number 3 bytes 0x000000 Received packet number from field Count in 0x84 and 0x8C
Packet Number #2 3 bytes 0x000004 Last received packet number (only when false)
Total Size: 7 or 10 Bytes

Sent after a 0x8X. It's used to ACK recieval of packets. The second packet number is optional and only there when bool is false.


Packet Encapsulation format

The payload in 0x80-0x8F packets is encoded using different schemes. To decode them, you've to use the Encapsulation ID to check wich type you should use. The Encapsulation ID is the first byte of the payload.

Multiple Data Encapsulation packets could be present in one packet. If you want to send data, use 0x00


Calculate length in bytes:

real length = length / 8


0x00

Encapsulation ID Field Name Field Type Example Notes
0x00 length short 0x0090 Length of Packet in bits
Packet Data Packet 0x09d92145...
Total Size: 3 Bytes + Packet Data length

0x40

Encapsulation ID Field Name Field Type Example Notes
0x40 length short 0x0090 Length of Packet in bits
Count 3 bytes 0x000000 Unknown use
Packet Data Packet 0x09d92145...
Total Size: 6 Bytes + Packet Data length

0x60

Encapsulation ID Field Name Field Type Example Notes
0x60 length short 0x0090 Length of Packet in bits
Count 3 bytes 0x000000 Unknown use
Unknown 4 bytes 0x00000000 Only sent on first iteration
Packet Data Packet 0x09d92145...
Total Size: 12 Bytes + Packet Data length


Data Packets

This information has been generated using PocketBurger, then edited manually.

Minecraft: Pocket Edition v0.7.3, protocol #11

LoginPacket (0x82)

Server to Client


Packet ID Field Name Field Type Notes
0x82 a string8
b int
c int
d int
e string8

LoginStatusPacket (0x83)

Client to Server


Packet ID Field Name Field Type Notes
0x83 a int

ReadyPacket (0x84)

Server to Client


Packet ID Field Name Field Type Notes
0x84 bits[8](a) byte[]

MessagePacket (0x85)

Two-Way


Packet ID Field Name Field Type Notes
0x85 a string8

SetTimePacket (0x86)

Client to Server


Packet ID Field Name Field Type Notes
0x86 a int

StartGamePacket (0x87)

Client to Server


Packet ID Field Name Field Type Notes
0x87 a int
b int
c int
d int
e float
f float
g float

AddMobPacket (0x88)

Client to Server


Packet ID Field Name Field Type Notes
0x88 a int
b int
c float
d float
e float
f.degreesToChar() byte
g.degreesToChar() byte
Metadata(h) byte[]

AddPlayerPacket (0x89)

Client to Server


Packet ID Field Name Field Type Notes
0x89 (unsigned) a long
b string8
c int
d float
e float
f float
g.degreesToChar() byte
h.degreesToChar() byte
i short
j short
Metadata(k) byte[]

RemovePlayerPacket (0x8a)

Client to Server


Packet ID Field Name Field Type Notes
0x8a a int
(unsigned) b long

AddEntityPacket (0x8c)

Client to Server


Packet ID Field Name Field Type Notes
0x8c a int
(unsigned) b byte
c float
d float
e float
f int
g.clamp() short
h short
i short

RemoveEntityPacket (0x8d)

Client to Server


Packet ID Field Name Field Type Notes
0x8d a int

AddItemEntityPacket (0x8e)

Client to Server


Packet ID Field Name Field Type Notes
0x8e a int
b short
(unsigned) c byte
d short
e float
f float
g float
h byte
i byte
j byte

TakeItemEntityPacket (0x8f)

Client to Server


Packet ID Field Name Field Type Notes
0x8f a int
b int

MoveEntityPacket (0x90)

Client to Server


Packet ID Field Name Field Type Notes
0x90

MoveEntityPacket_PosRot (0x93)

None


Packet ID Field Name Field Type Notes
0x93 a int
b float
c float
d float
e float
f float

MovePlayerPacket (0x94)

Two-Way


Packet ID Field Name Field Type Notes
0x94 a int
b float
c float
d float
e float
f float

PlaceBlockPacket (0x95)

None


Packet ID Field Name Field Type Notes
0x95 a int
b int
c int
(unsigned) d byte
(unsigned) e byte
(unsigned) f byte
(unsigned) g byte

RemoveBlockPacket (0x96)

Server to Client


Packet ID Field Name Field Type Notes
0x96 a int
b int
c int
(unsigned) d byte

UpdateBlockPacket (0x97)

Client to Server


Packet ID Field Name Field Type Notes
0x97 a int
b int
(unsigned) c byte
(unsigned) d byte
(unsigned) e byte

AddPaintingPacket (0x98)

Client to Server


Packet ID Field Name Field Type Notes
0x98 a int
b int
c int
d int
e int
f string8

ExplodePacket (0x99)

Client to Server


Packet ID Field Name Field Type Notes
0x99 a float
b float
c float
d float
e int
f byte
g byte
h byte

LevelEventPacket (0x9a)

Client to Server


Packet ID Field Name Field Type Notes
0x9a a short
b short
c short
d short
e int

TileEventPacket (0x9b)

Client to Server


Packet ID Field Name Field Type Notes
0x9b a int
b int
c int
d int
e int

EntityEventPacket (0x9c)

Two-Way


Packet ID Field Name Field Type Notes
0x9c a int
(unsigned) b byte

RequestChunkPacket (0x9d)

Server to Client


Packet ID Field Name Field Type Notes
0x9d a int
b int

ChunkDataPacket (0x9e)

Client to Server


Packet ID Field Name Field Type Notes
0x9e a int
b int
(unsigned) c byte
d byte[]
e byte[]

PlayerEquipmentPacket (0x9f)

Two-Way


Packet ID Field Name Field Type Notes
0x9f a int
(unsigned) b short
(unsigned) c short
d byte

PlayerArmorEquipmentPacket (0xa0)

Two-Way


Packet ID Field Name Field Type Notes
0xa0 a int
b byte
c byte
d byte
e byte

InteractPacket (0xa1)

Two-Way


Packet ID Field Name Field Type Notes
0xa1 bits[8](a) byte[]
b int
c int

UseItemPacket (0xa2)

Server to Client


Packet ID Field Name Field Type Notes
0xa2 a int
b int
c int
d int
bits[16](e).reverseBytes() byte[]
(unsigned) f byte
g int
h float
i float
j float
k float
l float
m float

PlayerActionPacket (0xa3)

Server to Client


Packet ID Field Name Field Type Notes
0xa3 a int
b int
c int
d int
e int
f int

HurtArmorPacket (0xa5)

Client to Server


Packet ID Field Name Field Type Notes
0xa5 a byte

SetEntityDataPacket (0xa6)

Client to Server


Packet ID Field Name Field Type Notes
0xa6 a int
Metadata(b) byte[]

SetEntityMotionPacket (0xa7)

Client to Server


Packet ID Field Name Field Type Notes
0xa7 (unsigned) a.clamp() byte
b int
c short
d short
e short

SetRidingPacket (0xa8)

Client to Server


Packet ID Field Name Field Type Notes
0xa8 a int
b int

SetHealthPacket (0xa9)

Two-Way


Packet ID Field Name Field Type Notes
0xa9 a byte

SetSpawnPositionPacket (0xaa)

Client to Server


Packet ID Field Name Field Type Notes
0xaa a int
b int
(unsigned) c byte

AnimatePacket (0xab)

Two-Way


Packet ID Field Name Field Type Notes
0xab bits[8](a) byte[]
b int

RespawnPacket (0xac)

Two-Way


Packet ID Field Name Field Type Notes
0xac a int
b float
c float
d float

SendInventoryPacket (0xad)

None


Packet ID Field Name Field Type Notes
0xad a int
(unsigned) b byte
c short
Item(d) byte[]
Item(e) byte[]

DropItemPacket (0xae)

Server to Client


Packet ID Field Name Field Type Notes
0xae a int
(unsigned) b byte
Item(c) byte[]

ContainerOpenPacket (0xaf)

Client to Server


Packet ID Field Name Field Type Notes
0xaf (unsigned) a byte
(unsigned) b byte
(unsigned) c byte
d string8

ContainerClosePacket (0xb0)

Two-Way


Packet ID Field Name Field Type Notes
0xb0 (unsigned) a byte

ContainerSetSlotPacket (0xb1)

Two-Way


Packet ID Field Name Field Type Notes
0xb1 bits[8](a) byte[]
bits[16](b).reverseBytes() byte[]
Item(c) byte[]

ContainerSetDataPacket (0xb2)

Client to Server


Packet ID Field Name Field Type Notes
0xb2 (unsigned) a byte
b short
c short

ContainerSetContentPacket (0xb3)

Client to Server


Packet ID Field Name Field Type Notes
0xb3 (unsigned) a byte
b short
Item(c) byte[]

ContainerAckPacket (0xb4)

None


Packet ID Field Name Field Type Notes
0xb4 (unsigned) a byte
b short

ChatPacket (0xb5)

Client to Server


Packet ID Field Name Field Type Notes
0xb5 a string8

SignUpdatePacket (0xb6)

Two-Way


Packet ID Field Name Field Type Notes
0xb6 a short
(unsigned) b byte
c short
d string8

AdventureSettingsPacket (0xb7)

Client to Server


Packet ID Field Name Field Type Notes
0xb7 bits[32](a).reverseBytes() byte[]