Class ManaBurnoutCostEvent
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.ManaBurnoutCostEvent
Event that fires when mana cost is retrieved.
Mana cost is calculated as (mana + burnout), where mana is retrieved from the spell and burnout is the caster's current burnout value. Modifiers added in this event will then be applied to the result.
This event is not cancelable. This event is fired on the main event bus.
-
Nested Class Summary
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
ConstructorsConstructorDescriptionManaBurnoutCostEvent(net.minecraft.world.entity.LivingEntity entity, Spell spell, double mana, double burnout) -
Method Summary
Modifier and TypeMethodDescriptiondoubledoublegetMana()doubledoublevoidsetBurnout(double burnout) Modifies the burnout cost.voidsetMana(double mana) Modifies the mana cost.Methods inherited from class SpellEvent
getSpellMethods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
Constructor Details
-
ManaBurnoutCostEvent
public ManaBurnoutCostEvent(net.minecraft.world.entity.LivingEntity entity, Spell spell, double mana, double burnout)
-
-
Method Details
-
getOriginalMana
public double getOriginalMana()- Returns:
- The unmodified mana cost.
-
getOriginalBurnout
public double getOriginalBurnout()- Returns:
- The unmodified burnout cost.
-
getMana
public double getMana()- Returns:
- The potentially modified mana cost.
-
setMana
public void setMana(double mana) Modifies the mana cost.- Parameters:
mana- The new mana cost to set.
-
getBurnout
public double getBurnout()- Returns:
- The potentially modified burnout cost.
-
setBurnout
public void setBurnout(double burnout) Modifies the burnout cost.- Parameters:
burnout- The new burnout cost to set.
-