mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-26 21:58:20 -06:00
u
This commit is contained in:
parent
7251dacedc
commit
6f621d20a8
|
@ -3,12 +3,13 @@ use serde::{Serialize, Deserialize};
|
||||||
use crate::{chunk::BlockData, queue::QueuedBlock};
|
use crate::{chunk::BlockData, queue::QueuedBlock};
|
||||||
use super::client::ClientId;
|
use super::client::ClientId;
|
||||||
|
|
||||||
pub const PROTOCOL_ID: u16 = 3;
|
pub const PROTOCOL_ID: u16 = 0; //protocol id not used yet
|
||||||
|
|
||||||
pub const C_CLIENT_HELLO: u8 = 0;
|
pub const C_CLIENT_HELLO: u8 = 0;
|
||||||
pub const C_POSITION_CHANGED: u8 = 1;
|
pub const C_POSITION_CHANGED: u8 = 1;
|
||||||
pub const C_CHUNK_SUB_REQUEST: u8 = 2;
|
pub const C_CHUNK_SUB_REQUEST: u8 = 2;
|
||||||
pub const C_QUEUE_BLOCK: u8 = 3;
|
pub const C_CHUNK_UNUBSCRIBE: u8 = 3;
|
||||||
|
pub const C_QUEUE_BLOCK: u8 = 4;
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone)]
|
#[derive(Serialize, Deserialize, Clone)]
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
|
@ -25,6 +26,9 @@ pub enum ClientToServerMessage {
|
||||||
ChunkSubRequest {
|
ChunkSubRequest {
|
||||||
chunk: IVec3,
|
chunk: IVec3,
|
||||||
} = C_CHUNK_SUB_REQUEST,
|
} = C_CHUNK_SUB_REQUEST,
|
||||||
|
ChunkUnsubscribe {
|
||||||
|
chunk: IVec3,
|
||||||
|
},
|
||||||
QueueBlock {
|
QueueBlock {
|
||||||
item: QueuedBlock
|
item: QueuedBlock
|
||||||
} = C_QUEUE_BLOCK,
|
} = C_QUEUE_BLOCK,
|
||||||
|
|
Loading…
Reference in a new issue