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

[Request]Help for compatibility #234

Open
Kettle5000 opened this issue Mar 24, 2024 · 3 comments
Open

[Request]Help for compatibility #234

Kettle5000 opened this issue Mar 24, 2024 · 3 comments
Labels
Mod Compat An issue regarding mod compat

Comments

@Kettle5000
Copy link

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.

@Kettle5000 Kettle5000 changed the title Help for compatibility [Request]Help for compatibility Mar 24, 2024
@Sussy-Chungus

This comment was marked as off-topic.

@ichttt ichttt added the Mod Compat An issue regarding mod compat label Jul 6, 2024
@ichttt
Copy link
Owner

ichttt commented Jul 6, 2024

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?

@Kettle5000
Copy link
Author

Kettle5000 commented Jul 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod Compat An issue regarding mod compat
Projects
None yet
Development

No branches or pull requests

3 participants