2020-08-01 22:53:12 +01:00
|
|
|
{
|
|
|
|
types :
|
|
|
|
{
|
|
|
|
aliases :
|
|
|
|
{
|
|
|
|
ProtocolState : varint
|
|
|
|
}
|
|
|
|
|
|
|
|
primitives :
|
|
|
|
{
|
|
|
|
varint : int32_t
|
2020-08-02 02:44:35 +01:00
|
|
|
string : std::string
|
2020-08-03 06:07:32 +01:00
|
|
|
uuid : MinecraftUUID
|
2020-08-04 02:39:09 +01:00
|
|
|
position: BlockPos
|
2020-08-03 06:07:32 +01:00
|
|
|
|
|
|
|
uint64 : uint64_t
|
|
|
|
int64 : int64_t
|
|
|
|
uint32 : uint32_t
|
|
|
|
int32 : int32_t
|
|
|
|
uint16 : uint16_t
|
|
|
|
int16 : int16_t
|
|
|
|
uint8 : uint8_t
|
|
|
|
int8 : int8_t
|
2020-08-04 02:39:29 +01:00
|
|
|
byte : uint8_t
|
2020-08-03 07:31:33 +01:00
|
|
|
bool : uint8_t
|
2020-08-01 22:53:12 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
states :
|
|
|
|
{
|
|
|
|
Handholding : -1
|
|
|
|
Play : 0
|
|
|
|
Status : 1
|
|
|
|
Login : 2
|
|
|
|
}
|
|
|
|
|
|
|
|
messages :
|
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
handholding :
|
2020-08-01 22:53:12 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
serverbound :
|
2020-08-01 22:53:12 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
Handshake :
|
2020-08-01 22:53:12 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
id : 0
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
protocolVersion : varint
|
|
|
|
serverIP : string[255]
|
|
|
|
port : uint16
|
|
|
|
intention : ProtocolState
|
|
|
|
}
|
2020-08-01 22:53:12 +01:00
|
|
|
}
|
|
|
|
}
|
2020-08-03 06:07:32 +01:00
|
|
|
}
|
2020-08-02 02:44:35 +01:00
|
|
|
|
2020-08-03 06:07:32 +01:00
|
|
|
status :
|
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
clientbound :
|
2020-08-02 02:44:35 +01:00
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
Response :
|
2020-08-03 06:07:32 +01:00
|
|
|
{
|
|
|
|
id : 0
|
|
|
|
vars :
|
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
jsonResponse : string[32767]
|
2020-08-03 06:07:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-03 07:31:33 +01:00
|
|
|
Pong :
|
2020-08-02 02:44:35 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
id : 1
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
timestamp : uint64
|
|
|
|
}
|
2020-08-02 02:44:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-03 07:31:33 +01:00
|
|
|
serverbound :
|
2020-08-02 02:44:35 +01:00
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
Request :
|
2020-08-02 02:44:35 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
id : 0
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-03 07:31:33 +01:00
|
|
|
Ping :
|
2020-08-03 06:07:32 +01:00
|
|
|
{
|
|
|
|
id : 1
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
timestamp : uint64
|
|
|
|
}
|
2020-08-02 02:44:35 +01:00
|
|
|
}
|
|
|
|
}
|
2020-08-01 22:53:12 +01:00
|
|
|
}
|
|
|
|
|
2020-08-03 06:07:32 +01:00
|
|
|
login :
|
2020-08-01 22:53:12 +01:00
|
|
|
{
|
2020-08-03 06:07:32 +01:00
|
|
|
clientbound :
|
|
|
|
{
|
|
|
|
Disconnect :
|
|
|
|
{
|
|
|
|
id : 0
|
|
|
|
vars :
|
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
reason : string[32767]
|
2020-08-03 06:07:32 +01:00
|
|
|
}
|
|
|
|
}
|
2020-08-01 22:53:12 +01:00
|
|
|
|
2020-08-03 06:07:32 +01:00
|
|
|
Success :
|
|
|
|
{
|
|
|
|
id : 2
|
|
|
|
vars :
|
|
|
|
{
|
2020-08-03 07:31:33 +01:00
|
|
|
uuid : string[32]
|
2020-08-03 06:07:32 +01:00
|
|
|
username : string[16]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
serverbound :
|
|
|
|
{
|
|
|
|
Start :
|
|
|
|
{
|
|
|
|
id : 0
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
username : string[16]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-08-01 22:53:12 +01:00
|
|
|
}
|
2020-08-03 07:31:33 +01:00
|
|
|
|
|
|
|
play :
|
|
|
|
{
|
2020-08-06 02:25:36 +01:00
|
|
|
serverbound:
|
|
|
|
{
|
2020-08-08 01:25:32 +01:00
|
|
|
ChatMessage:
|
|
|
|
{
|
|
|
|
id : 0x03
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
message : string[256]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-06 02:25:36 +01:00
|
|
|
KeepAlive:
|
|
|
|
{
|
2020-08-08 01:25:32 +01:00
|
|
|
id : 0x0F
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
id : int64
|
2020-08-06 02:25:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-03 07:31:33 +01:00
|
|
|
clientbound :
|
|
|
|
{
|
2020-08-08 01:25:32 +01:00
|
|
|
ChatMessage:
|
|
|
|
{
|
|
|
|
id : 0x0F
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
jsonData : string[32767]
|
|
|
|
position : uint8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-03 07:31:33 +01:00
|
|
|
JoinGame :
|
|
|
|
{
|
|
|
|
id : 38
|
|
|
|
vars :
|
|
|
|
{
|
|
|
|
entityId : int32
|
|
|
|
gamemode : uint8
|
|
|
|
dimension : int32
|
|
|
|
seedHash : uint64
|
|
|
|
maxPlayers : uint8
|
|
|
|
levelType : string[16]
|
|
|
|
viewDistance : varint
|
|
|
|
reducedDebugInfo : bool
|
|
|
|
enableRespawnScreen : bool
|
|
|
|
}
|
|
|
|
}
|
2020-08-06 02:25:36 +01:00
|
|
|
|
|
|
|
KeepAlive:
|
|
|
|
{
|
|
|
|
id: 0x21
|
|
|
|
vars: {
|
|
|
|
id: int64
|
|
|
|
}
|
|
|
|
}
|
2020-08-13 04:55:43 +01:00
|
|
|
|
|
|
|
/*ChunkData:
|
|
|
|
{
|
|
|
|
id: 0x22
|
|
|
|
vars: {
|
|
|
|
chunkX: int32
|
|
|
|
chunkZ: int32
|
|
|
|
fullChunk: bool
|
|
|
|
// bitmask for each 16x16x16 chunk section
|
|
|
|
// LSB: section at y=0, bits for up to y=15
|
|
|
|
chunkSections: varint
|
|
|
|
heightmaps: nbt
|
|
|
|
|
|
|
|
// only if fullChunk == true
|
|
|
|
biomes: int32[1024]
|
|
|
|
|
|
|
|
dataSize: varint
|
|
|
|
data: byte[dataSize]
|
|
|
|
|
|
|
|
numBlockEntities: varint
|
|
|
|
blockEntities: nbt[numBlockEntities]
|
|
|
|
|
|
|
|
}
|
|
|
|
}*/
|
2020-08-04 02:40:15 +01:00
|
|
|
|
|
|
|
PlayerPositionAndLook:
|
|
|
|
{
|
|
|
|
id: 0x36
|
2020-08-04 03:14:26 +01:00
|
|
|
enums: {
|
|
|
|
RelativeFlags: {
|
|
|
|
X: 1,
|
|
|
|
Y: 2,
|
|
|
|
Z: 4,
|
|
|
|
Y_ROT: 8,
|
|
|
|
X_ROT: 16,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
aliases: {
|
|
|
|
RelativeFlags: byte
|
|
|
|
}
|
2020-08-04 02:40:15 +01:00
|
|
|
vars: {
|
|
|
|
x: double
|
|
|
|
y: double
|
|
|
|
z: double
|
|
|
|
// xRot is yaw, yRot is pitch
|
|
|
|
xRot: float
|
|
|
|
yRot: float
|
2020-08-04 03:14:26 +01:00
|
|
|
flags: RelativeFlags
|
2020-08-04 02:40:15 +01:00
|
|
|
id: varint
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SpawnPosition:
|
|
|
|
{
|
|
|
|
id: 0x4E
|
|
|
|
vars: {
|
|
|
|
location: position
|
|
|
|
}
|
|
|
|
}
|
2020-08-03 07:31:33 +01:00
|
|
|
}
|
|
|
|
}
|
2020-08-01 22:53:12 +01:00
|
|
|
}
|
|
|
|
}
|