When setting hunger taking damage resets hunger

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

Topic category: Bugs and solutions

Last seen on 01:18, 24. Feb 2021
Joined Apr 2020
User points:

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.