-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetproto.txt
79 lines (69 loc) · 1.21 KB
/
netproto.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Protocol version 0x20231227
Each packet is prefixed by 16-bit length
Lenght 0 packet is allowed as a keep-alive
ClientIntroduction
C: 0x00
C: long proto version
size 5
ServerIntroduction
S: 0x01
S: long proto version
S: long player eid
S: long world x size
S: long world z size
S: long world z bits
size 21
the following is not accounted in the size of the packet
S: zlib compressed world data
uncompressed size: x*y*z*3/2 bytes
compressed size: a multiple of 1024 bytes
Disconnect
C/S: 0x02
C/S: string reason
size 1 + x
0x03 reserved
0x04 reserved
0x05 reserved
ChangePosition
C: 0x06
C: long player x pos * 32
C: long player y pos * 32
C: long player z pos * 32
C: short player yaw * 65535 / 2pi
C: short player pitch * 65535 / 2pi
size 17
ChangeBlock
C: 0x07
C: long block index
C: byte old id
C: byte old data
C: byte new id
C: byte new data
size 9
BlockUpdates
S: 0x08
repeat {
S: long block index
S: byte new id
S: byte new data
}
size 1 + 6x
EntityEnter
S: 0x09
S: long id
size 5
EntityLeave
S: 0x0A
S: long id
size 5
EntityUpdates
S: 0x0B
repeat {
S: long id
S: long player x pos * 32
S: long player y pos * 32
S: long player z pos * 32
S: short player yaw * 65535 / 2pi
S: short player pitch * 65535 / 2pi
}
size 1 + 20x