This project is a Minecraft clone in OpenGL/WebGL using a custom network protocol
The kotlin client is deprecated and not up to date, check this client instead
The JavaScript client is not up to date
Identification: 0x00
id | entityId |
---|---|
byte | int |
Add Entity: 0x01
id | entityId | x | y | z | yaw | pitch | name |
---|---|---|---|---|---|---|---|
byte | int | float | float | float | float | float | byte[64] |
Remove Entity: 0x02
id | entityId |
---|---|
byte | int |
Update Entity Position: 0x03
id | entityId | x | y | z | yaw | pitch |
---|---|---|---|---|---|---|
byte | int | float | float | float | float | float |
Send Chunk: 0x04
id | x | y | z | BlockType |
---|---|---|---|---|
byte | int | int | int | byte[4096] |
Send Mono Type Chunk: 0x05
id | x | y | z | BlockType |
---|---|---|---|---|
byte | int | int | int | byte |
Chat: 0x06
id | message |
---|---|
byte | byte[4096] |
Update Entity Metadata: 0x07
id | entityId | name |
---|---|---|
byte | int | byte[64] |
Update Entity: 0x00
id | x | y | z | yaw | pitch |
---|---|---|---|---|---|
byte | float | float | float | float | float |
Update Block: 0x01
id | BlockType | x | y | z |
---|---|---|---|---|
byte | byte | int | int | int |
Block Bulk Edit: 0x02
id | blockCount | BlockType | x | y | z | BlockType | x | y | z | ... |
---|---|---|---|---|---|---|---|---|---|---|
byte | Int | byte | int | int | int | byte | int | int | int | ... |
Chat: 0x03
id | message |
---|---|
byte | byte[4096] |
Client metadata: 0x04
id | renderDistance | name |
---|---|---|
byte | byte | byte[64] |
id | Name |
---|---|
0 | Air |
1 | Grass |
2 | Dirt |
3 | Stone |
4 | Oak Log |
5 | Oak Leaves |
6 | Glass |
7 | Water |
8 | Sand |
- Packets Server bound
[0x00]
check the cliententityId
. Client must save theentityId
received by the packet Client Bound0x00
upon connecting to the server. Without this ID client won't be able to move - This protocol uses BIG ENDIAN
- Server doesn't send empty chunk
First read the first byte to determine which packet you received. Then read the rest of the data