Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

18M Downloads

[Bug] SpellPreCastEvent does not affect mobs.

IGN-Styly opened this issue ยท 1 comments

commented

Observed behaviour

I set up a simple event listener that cancels spells, this works only with players, mobs like the pyromancer and cryomancer were unaffected.

Expected behaviour

All entities that can cast are blocked from doing so.

Steps to reproduce

Create a Event listener

public class CancelSpell {
    @SubscribeEvent
    public static void SpellPreCastEvent(SpellPreCastEvent event){
            event.setCanceled(true);
    }
}

And then register it

NeoForge.EVENT_BUS.addListener(CancelSpell::SpellPreCastEvent);

Server Type

Single Player

Crashlog

No response

Iron's Spells N Spellbooks version

1.21-3.4.2

Forge version

21.0.167

Other mods

No response

commented

Using Neoforge