Class SpellCastEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
at.minecraftschurli.mods.arsmagicalegacy.api.event.SpellEvent
at.minecraftschurli.mods.arsmagicalegacy.api.event.SpellCastEvent
- Direct Known Subclasses:
SpellCastEvent.Post, SpellCastEvent.Pre
Event that is fired when a spell is cast. Has SpellCastEvent.Pre and SpellCastEvent.Post sub events.
In order to perform additional functionality when a particular spell part is cast, use SpellPartCastEvent.
This event is not cancelable. This event is fired on the main event bus.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired after the spell is cast, mana and burnout have been modified (if applicable), and magic xp has been awarded (if applicable).static classFired immediately before the spell is cast.Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.LivingEvent.LivingJumpEvent, net.neoforged.neoforge.event.entity.living.LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.EntityEvent.EnteringSection, net.neoforged.neoforge.event.entity.EntityEvent.EntityConstructing, net.neoforged.neoforge.event.entity.EntityEvent.Size -
Constructor Summary
ConstructorsConstructorDescriptionSpellCastEvent(net.minecraft.world.entity.LivingEntity entity, Spell spell, double mana, double burnout) -
Method Summary
Methods inherited from class SpellEvent
getSpellMethods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
Constructor Details
-
SpellCastEvent
public SpellCastEvent(net.minecraft.world.entity.LivingEntity entity, Spell spell, double mana, double burnout)
-
-
Method Details
-
getMana
public double getMana()- Returns:
- The mana cost of the spell. Final by this point, to modify, use
ManaBurnoutCostEvent.
-
getBurnout
public double getBurnout()- Returns:
- The burnout cost of the spell. Final by this point, to modify, use
ManaBurnoutCostEvent.
-