Health and hunger system
This commit is contained in:
+4
-2
@@ -7,7 +7,7 @@ export const AIR_ID = "bworld:air";
|
||||
|
||||
// bump when a client and server of different versions can't play together.
|
||||
// the server rejects a different version before the client downloads anything
|
||||
export const PROTOCOL_VERSION = 4;
|
||||
export const PROTOCOL_VERSION = 5;
|
||||
|
||||
export interface PlayerInfo {
|
||||
id: string;
|
||||
@@ -123,7 +123,9 @@ export type ServerMessage =
|
||||
| { type: "screen_properties"; properties: Record<string, number> }
|
||||
| { type: "close_screen" }
|
||||
// the world time, every second and when it's changed. clients count ticks in between
|
||||
| { type: "time"; time: number };
|
||||
| { type: "time"; time: number }
|
||||
// the player's own health, hunger and saturation, when they change
|
||||
| { type: "vitals"; health: number; food: number; saturation: number };
|
||||
|
||||
export const MAX_NAME_LENGTH = 16;
|
||||
export const MAX_CHAT_LENGTH = 256;
|
||||
|
||||
Reference in New Issue
Block a user