[1.12.2] First aid is doing damage calculation to early.
Speiger opened this issue ยท 4 comments
Writing a new mod right now.
We are doing some enchantments which 1 of them is like preventing you to die, but it extra damages the armor.
The issue that first aid has it blocks anything armor/post armor calculation, and simulates that themselves. (Not fully though)
This could also explain #53 (Maybe not)
Because there are moddevs that expect that minecrafts damage calculation is done how it was written.
Also there is no obviouse reason to use the LivingHurtEvent for that kind of logic,
The LivingDamageEvent should be plenty.
unless if you have special reasons why that is not compatible, then throw the "LivingDamageEvent" yourself.
Would be nice if that could be added/fixed?
Thanks for reading.
Speiger
The reason I use LivingHurtEvent instead of LivingDamageEvent is that I do custom armor calculations (as first aid only takes the armor of the specific limb into account). I also post a LivingDamage event when I did my armor/enchantment calculations:
This will not contain the damage value you may expect from the vanilla pipeline, but it is the one used in firstaid for damaging the limb.
I still have to investigate #53, I'm not sure what is causing this
Yeah this one is my mistake.
We compare the damage against the existing health while first aid splits that up so our logic does never trigger.