Health and hunger system

This commit is contained in:
2026-09-26 21:07:36 -03:00
parent 0fa6ec4ed3
commit 8d9c85d379
18 changed files with 662 additions and 8 deletions
+4
View File
@@ -10,6 +10,10 @@ const SEND_POSITION_TICKS = 2;
export class LocalPlayer extends Player {
client: Client;
inventories = new ClientInventories();
// what the server says, see server/game/vitals.ts. out of 20
health = 20;
food = 20;
saturation = 5;
move_speed = 4;
// blocks per second, peaks about 1.25 blocks up with the entity's gravity and drag