mojira.dev
MC-313684

Natural regeneration triggers after foodLevel drops below 20 via exhaustion at 0 saturation

In the hunger and health tick processing logic, natural regeneration checks appear to execute after exhaustion processing, or fail to reset the regeneration timer (foodTickTimer) when foodLevel drops from 20 to 19 at zero saturation.

​Specifically, when a player has foodLevel = 20 and foodSaturationLevel = 0 while missing health, the game enters the standard slow regeneration cycle (1 health point every 80 game ticks). However, if the player manually increases foodExhaustionLevel (e.g., by sprinting or jumping) right as the regeneration tick occurs—causing foodLevel to drop from 20 to 19—the player still receives the half-heart (1 HP) heal immediately after the hunger bar visibly decreases, before the regeneration-induced exhaustion (6.0) further depletes foodLevel.

​Steps to Reproduce:

  1. ​Ensure the player has taken damage (e.g., Health < 20).

  2. ​Set the player's hunger attributes to full hunger (foodLevel = 20) and zero saturation (foodSaturationLevel = 0). (Can be verified via debug mods or by exhausting saturation precisely to 0).

  3. ​Stand still and observe the slow natural regeneration cycle (which heals 1 health point every 4 seconds / 80 ticks and drains 1.5 hunger points via exhaustion).

  4. ​Just before the 80-tick regeneration threshold completes, sprint and jump repeatedly to manually accumulate 4.0 foodExhaustionLevel, forcing foodLevel to drop from 20 to 19.

  5. ​Observe the health bar and hunger bar simultaneously.

​Observed Result:

foodLevel decreases from 20 to 19 due to movement exhaustion, yet the player still immediately heals 1 health point (0.5 hearts) from the pending regeneration tick, followed by an additional drop in foodLevel caused by the 6.0 exhaustion cost of healing.

​Expected Result:

Manual exhaustion depleting foodLevel below 20 (or interrupting the regeneration cycle) should either recalculate the regeneration condition before applying the heal, or reset foodTickTimer so that movement-induced hunger loss does not overlap with a pending regeneration tick.

Comments 0

No comments.

Belutyyy

(Unassigned)

Unconfirmed

26.3

Retrieved