First Aid

First Aid

15M Downloads

[Request]Help for compatibility

Kettle5000 opened this issue ยท 3 comments

commented

I'm trying to make an enchantment mod that adds another damage reduction layer in the event LivingDamageEvent (after all reductions)
I have seen your very complex code (im new in this) and i have seen that it will work in normal vanilla conditions but not when the damage is distributed
Right now, if a player has this enchantment on the boots, the damage reduction will still apply to other areas(like the head)
I'm asking for help on how can i check where part was damaged and apply the reduction according to the enchantment level of the piece of armor.

commented

Kettle, can you do me a solid and upload your Missing Damage Model fix to Curseforge or something. I have no idea how to decompile and recompile and shit. I've never used github, but I'd like to implement your fix, please.

edit: I think it wont build because you use NeoForged and I'm using Forge. It's the only thing I noticed that might be why it keeps failing.

commented

Hmmm. So you are adding your own enchantment, and it is currently applied globally. I can't seem to find your code on your Github account. Is it possible for you link me to your current code and/or send me a version of your mod, so I can take a look?

commented

I dont think there is need to do that since is just for a specific enchantment
however it could be nice to also create a new enchantment or maybe to know how to achieve different things with your mod.
First of all this is all of what the enchantment does.
image

It works nicely in vanilla conditions, but i would love to find a way to make it work with your mod, so this damage reduction is also applied locationally instead of globally
And yeah taking the chance to mention it
I would like to recommend some extra stuff to your code to add extra events, not only because of LivingDamageEvent but the fact that, as far as i was able to understand in your code, you are intercepting the calculations all by yourself, so it could be a very nice oportunity to retrieve stuff like this
Damage Reducted by armor:
Damage Reducted by enchantments:
Damage Reducted by mob effects.
Damage Reducted by absorption (kind same thing as before)
Why would this be nice?
Cause it would allow to also make implementations like enchantments that allow ignoring only armor but not the rest, or only enchantments but not armor.
Hope you get where im getting to
I would also like to ask you permission to try those changes myself in my own versiion of this mod, if i succeed with this i will inmediately give you the code.
PD: sorry this example uses new NeoForge damage events, but the logic is the same