Difference between revisions of "Pocket Edition Protocol Documentation"
(Created page with "This is the (unofficial) protocol docs for Minecraft: PE. The protocol currently uses UDP for communication, different from PC (TCP). The usual UDP issues are still here (lost...") |
m |
||
Line 42: | Line 42: | ||
| class="col3" | 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{|}~ | | class="col3" | 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{|}~ | ||
|} | |} | ||
+ | |||
+ | |||
+ | == Reference == | ||
+ | |||
+ | The latest version of the protocol is not fully documented yet, but an automatically generated specification of many of the packages can be found in the MiNET server code https://github.com/NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Net/MCPE%20Protocol%20Documentation.md |
Revision as of 23:07, 10 January 2015
This is the (unofficial) protocol docs for Minecraft: PE. The protocol currently uses UDP for communication, different from PC (TCP). The usual UDP issues are still here (lost packets, wrong order, etc.), but the protocol solves a few of those problems using special packet encapsulation, based on TCP. The Minecraft: PE client uses RakNet for it's networking library. Even though it uses RakNet, you can still write software without the library.
Data Types
Minecraft packets use different data types to communicate with each other. The documented ones are listed below:
Size | Range | Notes | |
---|---|---|---|
byte | 1 | -128 to 127 |
|
short | 2 | -32768 to 32767 |
|
Integer | 4 | -2147483648 to 2147483647 |
|
Long | 8 |
| |
MAGIC | 16 | 0x00ffff00fefefefefdfdfdfd12345678
|
always those hex bytes, corresponding to RakNet's default OFFLINE_MESSAGE_DATA_ID |
string | short + string | 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{|}~ |
Reference
The latest version of the protocol is not fully documented yet, but an automatically generated specification of many of the packages can be found in the MiNET server code https://github.com/NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Net/MCPE%20Protocol%20Documentation.md