Lifemending not reacting with Harder natural healing and scaling health bandage
Darkmega18 opened this issue ยท 3 comments
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.
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
It might be possible to store partial heals in the item nbt and track smaller heals that way, but currently they are ignored
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
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