When setting hunger taking damage resets hunger

Started by Paulypus on Wed, 12/30/2020 - 00:17

Topic category: Troubleshooting, bugs, and solutions

Last seen on 20:21, 5. Feb 2022
Joined Apr 2020

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
When setting hunger taking damage resets hunger
Wed, 12/30/2020 - 00:17

Hello! I am trying to make a feature in my mod that when the player sleeps they lose 5 bars of hunger, but I have a problem. When the player takes damage after sleeping, the hunger resets to what it was before they slept. This occurs regardless of the amount of time after sleeping. I am almost certain this is a bug and given that it was not fixed when 2020.5 was released I am assuming this has not been reported yet. If anyone knows how to fix this, please tell me.