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

Lifemending not reacting with Harder natural healing and scaling health bandage #930

Open
Darkmega18 opened this issue Jun 26, 2023 · 3 comments
Labels
mod interaction Issue occurs only when another mod is present

Comments

@Darkmega18
Copy link

Darkmega18 commented Jun 26, 2023

MC 1.19.2
Apoth: 1.19.2-6.2.1.jar
As I sent on the discord, harder natural healing "natural" healing doesn't seem to be ticking my lifemending to repair itself. This might be the way it's coded or perhaps the miniscule amount of healing per heal tick it's actually ticking (configured for 0.2 HP per 20 ticks, for basically 1 HP every 5 seconds) Where as regeneration applied by a majrusz difficulty bandage is repairing the gear just fine.

The bandage effect from scaling health applied by it's bandage and medkit also didn't seem to be being caught by it which is a potentially wonky heal also due to it being a percentage amount of your max HP over X time.

Is there some way you can make it more robust in detecting different sources of healing or changes in health like this or is it down to badly coded heals you can't catch? I currently have irons spells in my pack which has healing spells which I could test it against also later when I next play.

@Shadows-of-Fire
Copy link
Owner

Life Mending works off of the LivingHealEvent, which I believe should be firing on all heals.
However, small heals (those smaller than the per durability point cost) do not currently contribute to life mending

https://github.com/Shadows-of-Fire/Apotheosis/blob/1.19/src/main/java/shadows/apotheosis/ench/enchantments/corrupted/LifeMendingEnchant.java#L69

It might be possible to store partial heals in the item nbt and track smaller heals that way, but currently they are ignored

@Darkmega18
Copy link
Author

Darkmega18 commented Jun 26, 2023

well that explains my natural healing then. So I guess I'll just take a look at the other heals at another time throughout the pack.

The nbt storage of the heals could be a neat idea in that regard then.
would you be able to take a look at how scaling health does their bandage heal? I'm pretty sure scaling health also has a mechanic related to giving regeneration based on max HP or something as part of it's configs. so not sure if it handles scaled healing like that in another way, like just setting attributes or something.
https://github.com/SilentChaos512/ScalingHealth/tree/1.19

@Shadows-of-Fire
Copy link
Owner

It looks like SH is going through the event, so I'm not sure why that wouldn't be working. SilentLib does have code for "healing that bypasses the event" though, which is concerning. https://github.com/SilentChaos512/SilentLib/blob/1.19.x/src/main/java/net/silentchaos512/lib/util/EntityHelper.java#L89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod interaction Issue occurs only when another mod is present
Projects
None yet
Development

No branches or pull requests

2 participants