Breathing !

This commit is contained in:
2026-10-02 11:28:30 -03:00
parent 9ca717d2d0
commit 88d6de13d5
10 changed files with 50 additions and 12 deletions
+2 -1
View File
@@ -79,11 +79,12 @@ const NO_INPUT: MoveInput = { x: 0, z: 0, jump: false, sprint: false, sneak: fal
export class LocalPlayer extends Player {
client: Client;
inventories = new ClientInventories();
// what the server says, see server/game/vitals.ts. food out of 20, health out of max_health
// what the server says, see server/game/vitals.ts. food and air out of 20, health out of max_health
health = 20;
max_health = 20;
food = 20;
saturation = 5;
air = 20;
// the attack speed attribute the server sent, and when they last attacked or switched slots, for the indicator
attack_speed = 4;
last_attack = -Infinity;