illusivesoulworks / consecration

Minecraft Mod: Makes the undead more resilent except against fire and holy damage, and adds new features to help you slay them
https://www.curseforge.com/minecraft/mc-mods/consecration
Other
4 stars 5 forks source link

(Compatibility) Bewitchment compatibility #39

Closed Azmalent closed 4 years ago

Azmalent commented 5 years ago

Bewitchment has a holy water potion that doesn't work with Consecration when added to the config (it seems that it's not registered as a potion type, which is what Consecration expects)

TheIllusiveC4 commented 5 years ago

Hm, interesting. I'll look into it.

TheIllusiveC4 commented 4 years ago

I've been working on this on and off, but it looks like Bewitchment has made some big changes in the last month. After trying to implement compatibility with the new changes, it looks like it won't be possible due to the way that the Holy Water from Bewitchment deals damage.

Specifically, it doesn't give any information that I can hook into to identify the damage it deals as "holy". I cannot hook into the potion entity to try and parse the potion effects nor can I evaluate the damage type because it deals generic magic damage. So unfortunately, my hands are tied at the moment.

Sunconure11 commented 4 years ago

I created a pull for adding it to the config. Test it to see if it works.

Note that recently a coremod had to be added to BW in light of some potion shenanigans.

Sunconure11 commented 4 years ago

I can bring one of the coders to look at this, though, if it's still having issues as of the latest update. @anqingchen

TheIllusiveC4 commented 4 years ago

The proposed change to the config, while necessary, wouldn't fix the issue entirely (assuming the latest release of Bewitchment is up-to-date in this regard). I've tested it to make sure and the issue does remain.

This line needs to be updated to include information about the potion entity performing the damage, largely like what vanilla does for its instant effects. So, something like living.attackEntityFrom(DamageSource.causeIndirectMagicDamage(source, indirectSource), 8 * (amplifier + 1));. Otherwise, that information is lost and Consecration can't identify the potion effect.

Sunconure11 commented 4 years ago

Alright, I've implemented your line.