illusivesoulworks / charmofundying

Minecraft Mod: Adds curio support for the Totem of Undying so you don't have to be holding it.
https://www.curseforge.com/minecraft/mc-mods/curio-of-undying
Other
4 stars 13 forks source link

move isByPassInvul check #12

Closed Affehund closed 2 years ago

Affehund commented 2 years ago

This PR moves the isByPassInvul check inside the hasTotem check to fix a mod conflict with the void totem mod, which only fires if the player is in the void (using checkTotemDeathProtection). Previous to this PR the void totem didn't work when the charm of undying mod is installed as it always canceled the checkTotemDeathProtection if the player suffers from damage in the void (isBypassInvul also means void damage). This PR now fixes this issue.

Issue reference: Affehund/VoidTotem#17

TheIllusiveC4 commented 2 years ago

Thanks for bringing this issue to my attention. I opted for an alternative solution where I simply move the injection point further down, after yours. This is in order to avoid making expensive calls to find a totem when it isn't applicable to begin with. The newest version should allow the Void Totem to function properly now, let me know if this is still not the case.

Affehund commented 2 years ago

Thank you very much! This solutions sounds very good!