* Add hunger and hunger bar
- New functions added to Player struct in game.zig to use and heal hunger.
- If an attempt is made to use more hunger than there is available, the player is killed.
- Hunger bar uses placeholder icons.
- Hunger bar is based on the health bar
- Hunger bar is anchored to the left of the hotbar, rather than the right like the health bar.
* Don't kill player when hunger runs out.
- Don't use hunger when there's not enough to use
- Allow for code to know if hunger was used, so that is can handle not having enough hunger.
* New hunger textures
* Desaturate the highlight a little
* Return true if hunger was already true.
* Fix formatting
* Rename hunger to energy, and fix other issues.
* Make energy synchronized between client and server
Also removes the functions that add/remove energy on the game.Player struct
* Run formatter
* Fix incorrect formatting by formatter.
* Remove AddHunger struct and addHunger function
- Keep base operation so things like accessories and food can use it when syncing
* Fix formatting again.
---------
Co-authored-by: Carrie <carriecapp9@gmail.com>
* add player health and fall damage and /kill
* less latency for taking damage
* clamp health
* changes
* final changes maybe
* return serverFailure if target not found
* fix error
* remove /damage
To let the rest of the code know about this decision I implemented a wrapper over the Allocator interface which cannot fail.
This is just the first step in the upcoming refactoring attempt.