Managing Hunger and Saturation with the /foodbar Command
Managing player hunger traditionally requires dealing with hidden saturation values and natural exhaustion timers. Dawn API includes the /foodbar command to give players and mapmakers precise control over both food levels and saturation points directly.
Adjusting Food and Saturation Values
To alter an entity's food statistics, follow these steps with cheats enabled:
1. Open your chat window or open a command block interface.
2. Type the /foodbar command followed by the target player or entity selector.
3. Input the desired food level and saturation values according to the command's prompts, then press Enter to execute.
Because the command controls both the visible hunger bar and the hidden saturation buffer, you can configure precise nutritional states in a single action.
Practical In-Game Uses
This command serves several common gameplay and mapmaking functions:
- Survival Challenges: Set a player's hunger to low values at the start of a custom survival scenario or puzzle map without waiting for hunger to drain naturally.
- Instant Recovery: Instantly restore hunger and saturation after grueling minigames or boss battles.
- Mechanic Testing: Rapidly test health regeneration rates or hunger-depletion mechanics by dialing in exact food values instantly.