This project is a Minecraft clone in OpenGL/WebGL using a custom network protocol
The kotlin client is up to date and ready to use
The JavaScript client is not up to date
Identification: 0x00
id | entityId |
---|---|
byte | int |
Add Entity: 0x01
id | entityId | x | y | z | yaw | pitch |
---|---|---|---|---|---|---|
byte | int | float | float | float | float | float |
Remove Entity: 0x02
id | entityId |
---|---|
byte | int |
Update Entity: 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 |
Update Entity: 0x00
id | entityId | x | y | z | yaw | pitch |
---|---|---|---|---|---|---|
byte | int | 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 | ... |
id | Name |
---|---|
0 | Air |
1 | Grass |
2 | Dirt |
3 | Stone |
4 | Oak Log |
5 | Oak Leaves |
- 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