Iron's Gems 'n Jewelry

Iron's Gems 'n Jewelry

3M Downloads

Tearstone Rings only apply immunity on equip, but not if already equipped [Craftoria modpack]

nitrofenix opened this issue ยท 6 comments

commented

Per title, creating a Tearstone Ring to give immunity to various MobEffects doesn't actually provide immunity to the designated effect, only removes the effect when the ring is equipped. If the effect is applied a second time after equipping, the effect continues until it expires, is removed by other means (i.e., milk, or unequipping/re-equipping the ring) or the player dies.

Rather than using onEquip for these rings, suggest using a similar implementation used by immunity rings in Irons Spells n Spellbooks.

Version information:
irons_jewelry-1.0.0.jar

commented

I can reproduce the issue if i install craftoria. this indicates to me that a mod in there somewhere is breaking the mob effect event chain

commented

this code here should be taking care of effect immunity post-equip, i will look to see if i can reproduce this
https://github.com/iron431/irons-jewelry/blob/main/src/main/java/io/redspace/ironsjewelry/event/ServerEvents.java#L135

commented

tearstone rings work fully as intended for me. what other mods are you using, and what effect is not receiving immunity?

commented
commented

tearstone rings work fully as intended for me. what other mods are you using, and what effect is not receiving immunity?

Was initially testing pre-release functionality of the Craftoria modpack -- we're another minor version or two along, so I'll re-test and follow-up with results.

The effects that didn't seem to get immunity were poison and blindness I think?

commented

Using a fresh world for testing with Craftoria v1.10.2, with only tearstone rings equipped (made using mithril + gem) -- the only additional effect is regen 10 to extend testing:

image

Gem Effect Immune? Mob used for testing
Amethyst Poison No Witch
Diamond Weakness No Witch
Sapphire Slowness No Witch
Peridot Poison No Witch
Ruby Hunger No Husk
Moonstone Blindness No Illusioner
Onyx Blindness No Illusioner
Topaz Levitation No Shulker

In all cases, the effects were applied by the mobs and each effect only expired at the end of their duration, however unequipping/equipping each of the rings cleared each respective effect as previously stated.

Edit: Also adjusted the issue title to indicate the modpack.