Hunger



Hunger is an aspect of Minecraft that governs several aspects of gameplay. Eating food fills up the food bar, which is constantly drained by the player's actions. The food bar is located on the HUD opposite to the player's health bar on the bottom of the screen and is represented by ten shanks, and each are equal to 2 half-units of food.

While the player is sprinting, the food bar depletes much faster. The player is not able to sprint if their food level is or less.

The food bar does not drain when playing on Peaceful mode. If it somehow gets depleted, such as by allowing it to deplete by switching to another difficulty and back again, it will quickly regenerate.

Certain foods have a chance of inflicting hunger on the player upon consumption, which causes the player's hunger to deplete faster.

Effects

 * When the food bar is at or greater and saturation is non-empty, health regenerates at ( health point each $1/2$-second, costing 1 food point (4 units of exhaustion) per point healed.
 * When the food bar is at points or above, the player's health will slowly regenerate at a rate of  every 4 seconds, costing $3/4$ food points (3 units of exhaustion) per point healed.
 * When the food bar is at points or below, the player will not naturally regenerate health unless switching to Peaceful difficulty.
 * If the food bar is at points or below, then the player will not be able to sprint.
 * When the food bar is at, the player's health will deplete at a rate of every 4 seconds (this makes sleeping impossible). On Easy difficulty, the player's health stops dropping at , on normal it stops at , and on hard it keeps draining until either the player eats something or starves to death.

Food poisoning
Hunger, or food poisoning, is an effect induced by eating certain foods, which turns the food bar a sickly yellow-green and drains food more rapidly. The only foods, however, to inflict Hunger are rotten flesh, which can cause Hunger 80% of the time, raw Chicken, which causes Hunger only 30% of the time and Pufferfish, which will always cause Hunger (as well as Nausea and Poison). Eating a spider eye or poisonous potato actually deals the player Poison. The rest of the foods will not cause food poisoning.

Behavior
Hunger from food poisoning adds 15.0 to the player's exhaustion level over the course of 30 seconds, draining × 1⅞. In Peaceful mode, the food bar will change color, but will not drain out. Greenish swirls will also emit from the player, indicating that the player has food poisoning. When a pufferfish is eaten, it induces level III Hunger, but only for 15 seconds. In this time, 22.5 exhaustion points are added, draining × $2 13/16$.

The duration of Hunger does not stack. So, if the player eats many poisonous foods at once, they will only feel the negative effects of the most recent poisonous food, plus the consumption time of each other food. Also, drinking milk will negate the effect, allowing the player to potentially eat more poisonous food and constantly drink milk to fill the bar without being inflicted by Hunger.

Mechanics
The ten drumsticks shown at the bottom of the screen next to the health bar show the status of the player's food level. Each drumstick represents two food level points. Therefore, the maximum food level is 20.

There is another aspect of hunger that is not visible to the player. This is called the food saturation level. The player's hunger will not decrease until their food saturation level reaches zero. When the saturation level is at zero, the food bar will shake or jitter periodically. The maximum value of the food saturation level is equal to the current value of your food level. This means that if, for example, your food level is 20/20 (All your drumsticks are full) then your maximum food saturation level is also 20.

When you eat food, your food level and your food saturation level increase as long as they aren't already at their maximums. The amount that is replenished depends on the food item being consumed. The amount of food saturation replenished is not dependent on the number of food level points replenished; for instance, if the player eats a steak while missing only half a drumstick (food level 19/20), that player will still gain the full food saturation of the steak (up to saturation 20/20), despite having wasted all but one of the actual food points from the steak. It is not possible to eat food when your food level is at its maximum (except golden apples).

A third component of hunger is the food exhaustion level, which effectively tracks fractions of the next hunger or saturation point that will be spent. This value can range between 0.0 and 4.0. Certain actions the player takes increase this variable. The table below shows how different actions affect the player's exhaustion level. When exhaustion reaches 4.0 or above, it is reduced by 4.0 and the food saturation level is reduced by 1.0; if this brings the food saturation level below zero, it is set to zero instead. If the food saturation level is already at zero, then a point is removed from the player's food level and the player loses half a drumstick.

The last variable involved in the hunger mechanics is the foodTickTimer, which is used to time health regeneration or starvation.

Exhaustion level increase
''Any action not listed here will not increase exhaustion level. For example, the player can travel several days by boat and the food bar will not decrease.''