Skip to content

Conversation

@TNWing
Copy link

@TNWing TNWing commented Dec 31, 2025

Currently, the comfort effect does not respect the natural regeneration gamerule, so I added a flag for that.

Also, to account for a few situations regarding food & saturation values, I swapped out the saturation check for food level checks (although I am uncertain if the main branch's behavior is actually intended. If it is, then this change can be discarded.)

These are the scenarios that I was accounting for:

  1. Hunger bar greater than or equal to 18 with no saturation
  2. Hunger bar less than 18 with no saturation
  3. Hunger bar less than 18 with saturation

Situation 2 works as intended, and the player is healed. The concerns are situations 1 and 3.
In situation 1, as comfort is applied independently from natural regeneration, this can result in the player healing 2 HP instead of just 1.
In situation 3, comfort doesn't trigger despite not being able to consume saturation for fast healing. For instance, if I eat a beef stew when I am at 0 hunger, even though I'm below the threshold for natural regeneration, I will not heal due to having saturation.
By checking food levels instead of saturation, this ensures the player only heals if there is no way for natural regeneration to occur.

-Added check for natural regen game rule
-Added check to prevent healing if the player can regen naturally (non-saturation related health regen)
IF the player has saturation but not enough to trigger natural regeneration or saturation healing, comfort can still heal
removing the saturation check to just rely on the hunger check should cover all scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant