Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix health regen + hunger falling when food is disabled #1856

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

WillQizza
Copy link

@WillQizza WillQizza commented Jun 20, 2021

The purpose of this pull request is to implement health regeneration for difficulties above peaceful. (and also prevents a health desync between the client and server) This fixes #1855

Additionally, the issue #1859 is dependent on this pull request and the 2 are closely related. This pull request also updates hunger values and changes when food data is sent to the client in order to handle the hunger desync.

Food data is sent on all changes to saturation as the client appears to lose hunger (without attributes being sent) despite having saturation.
If food is disabled, food data is sent when the player should usually lose hunger in order to force it back to the max.

(Updated hunger values were pulled from https://minecraft.gamepedia.com/Hunger#Exhaustion_level_increase)

@WillQizza WillQizza changed the title Fix/health regen Fix health regen + hunger falling when food is disabled Jun 21, 2021
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.

Health regeneration does not exist server-side for non-peaceful difficulties
1 participant