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

Health regeneration does not exist server-side for non-peaceful difficulties #1855

Open
3 tasks done
WillQizza opened this issue Jun 20, 2021 · 0 comments · May be fixed by #1856
Open
3 tasks done

Health regeneration does not exist server-side for non-peaceful difficulties #1855

WillQizza opened this issue Jun 20, 2021 · 0 comments · May be fixed by #1856

Comments

@WillQizza
Copy link

WillQizza commented Jun 20, 2021

Expected Behavior

If I set the difficulty to easy/normal/hard, my player should recover half a heart every 4 seconds.
If I set the difficulty to peaceful, my player should still receive the recovery above on top of the peaceful natural regeneration.
If the server is a hardcore world, I should not regenerate health naturally.

Actual Behavior

There is no implementation of naturally regenerating your hearts on difficulties higher than peaceful. This causes a desync in health causing the client to display more health than they actually have. (the client regenerates health even if you don't send the update attribute packet)

Steps to Reproduce

  • Set the difficulty to a difficulty above peaceful in your server.properties
  • Damage yourself
  • Ensure that you have full hunger.
  • It will appear that you have regenerated clientside. However, if you take damage it will revert back to the health the server says you have.

Debug information

  • Debug link:
  • Timings link (if relevant):

Crashdump, Backtrace or Other Files

Checklist:

  • [] I included a /debugpaste link
  • I made sure there aren't duplicates of this report (Use Search)
  • I made sure I am using an up-to-date version of Nukkit
  • I Made sure the bug/error is not caused by a plugin
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 a pull request may close this issue.

1 participant