A simple minecraft mod that enables hunger and disables instant regeneration in peaceful mode.
Running out of hunger points behaves the same as in easy mode, which means the player loses health until the health bar is half full.
Client or server?
This mod is required on the server, and technically optional on the client. However, I'd highly recommend installing it on the client as well. As the game will show a full hunger bar even if it is not actually full, if you do not have the mod installed on your client.
It's as simple as two mixins and does not require fabric API. All it does is:
- make a player always lose hunger, regardless of whether they're in peaceful
- disable health and hunger regeneration on peaceful mode (by tricking that specific check into thinking the world is always in normal mode, this does not affect anything else)
That's it! Enjoy actually eating food in peaceful