Skip to content

Added Quick Regen#1170

Closed
tylerreese543-lab wants to merge 3 commits intoMCLCE:mainfrom
tylerreese543-lab:saturation-regeneration
Closed

Added Quick Regen#1170
tylerreese543-lab wants to merge 3 commits intoMCLCE:mainfrom
tylerreese543-lab:saturation-regeneration

Conversation

@tylerreese543-lab
Copy link
Copy Markdown
Contributor

Description

Added quick regeneration to the player code. A certain level of hunger/saturation are required for quickRegen to be enabled.

Changes

Previous Behavior

Did not heal according to saturation.

Root Cause

No code healed the player based on quick regen.

New Behavior

Now quick regen works.

Fix Implementation

Added new code in the player::aiStep to query saturation levels and subtract them in each heal. Operates on the same 3 saturation:half heart ratio as in modern LCE.

AI Use Disclosure

Related Issues

  • Fixes #[issue-number]
  • Related to #[issue-number]

tylerreese543-lab and others added 3 commits March 11, 2026 20:36
Just realized you need full hunger for quick regen (oops)
co-author helped me match the code to the Java decomp. Works perfectly in parity with Java.

Co-Authored-By: Alexandra-Myers <78748498+alexandra-myers@users.noreply.github.com>
@starseed12345
Copy link
Copy Markdown

Was it in the original LCE can't remember

@tylerreese543-lab
Copy link
Copy Markdown
Contributor Author

@starseed12345 Yes

@Frozenman-cell
Copy link
Copy Markdown

Is this the same as Java edition 1.6.4 or is this more similar/same as Java 1.11/Modern Legacy's natural regeneration?

@sylvessa sylvessa self-requested a review April 2, 2026 07:46
Copy link
Copy Markdown
Contributor

@sylvessa sylvessa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be accurate to java's, will talk with others if this should be merged

@sylvessa
Copy link
Copy Markdown
Contributor

sylvessa commented Apr 3, 2026

will not be merged until later due to this following 1.11 quick regen math

@sylvessa
Copy link
Copy Markdown
Contributor

sylvessa commented Apr 6, 2026

the status about this even being added in lce is very hard, the documentation behind this in LCE is very vague and I can't confirm if quick regen was really a thing of this era, but this follows 1.11 quick regen math so this wont be merged, sorry. You are free to open a pr if you can verify that quick regen existed between TU19-TU24 and make sure the code follows the math it used.

@sylvessa sylvessa closed this Apr 6, 2026
@tylerreese543-lab
Copy link
Copy Markdown
Contributor Author

Ah yes, it was in TU31. The code does indeed match the decomp, so I will just keep it on hold for now. Sorry.

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.

4 participants