Giant chesplate

This commit is contained in:
2026-10-01 16:58:30 -03:00
parent a7835261e1
commit 1fc92a7b00
21 changed files with 148 additions and 51 deletions
+2 -1
View File
@@ -216,7 +216,8 @@ export interface Player {
give_item(id: Id, count?: number, data?: unknown): void;
send_message(text: string): void;
teleport(x: number, y: number, z: number): void;
// health and hunger, like minecraft: 20 each, saturation is never above hunger
// health and hunger, like minecraft: 20 each, saturation is never above hunger. max_health is the
// bworld:max_health attribute
readonly health: number;
readonly max_health: number;
readonly food: number;
+3 -3
View File
@@ -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 = 15;
export const PROTOCOL_VERSION = 16;
export interface PlayerInfo {
id: string;
@@ -211,8 +211,8 @@ export type ServerMessage =
| { type: "time"; time: number }
// answers suggest: start is where in the text the suggestions replace from, up to the caret
| { type: "suggestions"; id: number; start: number; suggestions: { text: string; tooltip?: string }[] }
// the player's own health, hunger and saturation, when they change
| { type: "vitals"; health: number; food: number; saturation: number }
// the player's own health, max health, hunger and saturation, when they change
| { type: "vitals"; health: number; max_health: number; food: number; saturation: number }
// the player's own attack speed attribute, when it changes, for the attack indicator under the crosshair
| { type: "attack_speed"; value: number }
// a mod's server script talking to its client script, see ctx.net