Class SpellEvent.ManaCost.Pre

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
Enclosing class:
SpellEvent.ManaCost

public static final class SpellEvent.ManaCost.Pre extends SpellEvent.ManaCost
Event to modify the base cost and the modifier for the mana cost.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.github.minecraftschurlimods.arsmagicalegacy.api.event.SpellEvent.ManaCost

    SpellEvent.ManaCost.Post, SpellEvent.ManaCost.Pre

    Nested classes/interfaces inherited from class com.github.minecraftschurlimods.arsmagicalegacy.api.event.SpellEvent

    SpellEvent.BurnoutCost, SpellEvent.Cast, SpellEvent.ManaCost, SpellEvent.ModifyStats, SpellEvent.ReagentCost

    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.LivingTickEvent, net.neoforged.neoforge.event.entity.living.LivingEvent.LivingVisibilityEvent

    Nested 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

    Nested classes/interfaces inherited from class net.neoforged.bus.api.Event

    net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pre(net.minecraft.world.entity.LivingEntity entity, ISpell spell, float base, float multiplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    float
     
    float
     
    float
     
    void
    setBase(float base)
    Sets the base mana cost.
    void
    setMultiplier(float multiplier)
    Sets the mana cost multiplier.

    Methods inherited from class com.github.minecraftschurlimods.arsmagicalegacy.api.event.SpellEvent

    getSpell

    Methods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent

    getEntity

    Methods inherited from class net.neoforged.bus.api.Event

    getResult, hasResult, setResult

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pre

      public Pre(net.minecraft.world.entity.LivingEntity entity, ISpell spell, float base, float multiplier)
  • Method Details

    • getModifiedBase

      public float getModifiedBase()
      Returns:
      The base mana cost, containing all previous modifications.
    • getBase

      public float getBase()
      Returns:
      The unmodified base mana cost.
    • setBase

      public void setBase(float base)
      Sets the base mana cost.
      Parameters:
      base - The new value for the base mana cost.
    • getModifiedMultiplier

      public float getModifiedMultiplier()
      Returns:
      The mana cost multiplier, containing all previous modifications.
    • getMultiplier

      public float getMultiplier()
      Returns:
      The unmodified mana cost multiplier.
    • setMultiplier

      public void setMultiplier(float multiplier)
      Sets the mana cost multiplier.
      Parameters:
      multiplier - The new value for the mana cost multiplier.