4 Offset Size Type Description
5 0 4 data protocol tag, must be 0xFB1AB1AF
6 4 2 uint sequence number
8 8 4 data bitfield with previous acks
9 12 1 uint type code for the payload
10 13 3 none padding, reserved for future use
11 16 0-484 data payload, contents and length vary,
12 mostly depending on the type code
14 all multibyte values are in LE
15 the current code does no conversion, so only works on machines
16 with native LE (or BE if the server and all clients are on that,
17 but that's by accident and will break if conversion code is ever
24 vec3 12 3x 32bit float
25 vec3i 12 3x 32bit signed int
26 quat 16 4x 32bit float
27 entity state 64 vec3i, vec3, vec3, quat, vec3
36 To tell the other side we're still alive.
37 Both server and client will send this if they haven't sent something in
48 Sent from client to serveri as a request to join. The server may
49 respond negatively if the player name is already taken or some cap has
54 0 player name, max 32 byte UTF-8 string,
55 shorter names should be zero terminated
62 Sent by the server either as a response to a successful login or when
67 0 entity ID of the player, 32bit unsigned int
68 4 entity state of the player
69 68 name of the world the server's currently running
70 max 32 byte UTF-8 string
77 Sent by the server either as a respons to a failed login or when the
79 Optionally sent by the client on disconnect.
89 Sent by clients to notify the server of their changes to the player.
93 0 player's entity state as predicted by the client
94 64 movement input, 3x 16bit signed int, each component mapped from [-1,1] to [-32767,32767]
95 70 pitch input, 16bit signed int, mapped from [-PI/2,PI/2] to [-32767,32767]
96 72 yaw input, 16bit signed int, mapped from [-PI,PI] to [-32767,32767]
97 74 active actions, 8bit bit field, first three bits are primary, secondary, and tertiary
98 75 selected inventory slot, 8bit unsigned int
105 Sent by the server to notify the client of an entity entering spawn range.
109 0 entity ID, 32bit unsigned int
110 4 entity's skeleton ID, 32bit unsigned int
112 72 bounding box of the entity, 6x 32bit float
113 96 flags, 32bit bitfield with boolean values
115 100 entity name, max 32 byte UTF-8 string
122 Sent by the server to notify the client of an entity leaving spawn range.
126 0 entity ID, 32bit unsigned int
133 Sent by the server to notify the client of updated entity properties.
134 Contained entities must be ordered by ascending entity ID.
138 0 number of entities, 32bit int, 1-7
139 4 entity ID, 32bit unsigned int
142 Length: 4 + multiple of 68, max 480
148 Sent by the server to tell a client that its prediction is way off.
152 0 sequence number of the offending packet, 16bit unsigned int
153 2 entity state of the player's entity on the server
160 Sent by the server to inform the client of an upcoming chunk transmission.
164 0 transmission ID, used for reference with Chunk Data packets, 32bit unsigned int
165 4 flags, 32bit bitfield with boolean values
167 8 chunk coordinates, vec3i
168 20 data size, 32bit unsigned int
175 Raw chunk data sent by the server, optionally compressed with zlib.
179 0 transmission ID, references the Chunk Begin packet this data belongs to, 32bit unsigned int
180 4 block offset, offset of this block inside the whole data, 32bit unsigned int
181 8 block size, size of the data block, 32bit unsigned int
189 Sent by the server whenever one or more block in a chunk have changed.
193 0 chunk coordinates, vec3i
194 12 number of blocks, 32bit unsigned int, 1-78
195 16 first block index, 16bit unsigned int
196 18 first block data, 32bit
197 22 second block index...
198 Length: 16 + multiple of 6, max 484