Interface ManaHelper


public interface ManaHelper
Helper for mana-related operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    decreaseMana(net.minecraft.world.entity.LivingEntity entity, double amount)
    Decreases the LivingEntity's mana value.
    double
    getMana(net.minecraft.world.entity.LivingEntity entity)
     
    double
    Returns the base value used for calculating the maximum mana of a LivingEntity.
    double
    Returns the multiplier used for calculating the maximum mana of a LivingEntity.
    double
    getManaRegeneration(net.minecraft.world.entity.LivingEntity entity)
     
    double
    Returns the multiplier used for calculating the mana regeneration of a LivingEntity.
    double
    getMaxMana(net.minecraft.world.entity.LivingEntity entity)
     
    boolean
    increaseMana(net.minecraft.world.entity.LivingEntity entity, double amount)
    Increases the LivingEntity's mana value.
    boolean
    setMana(net.minecraft.world.entity.LivingEntity entity, double amount)
    Sets the LivingEntity's mana value.
    boolean
    setManaRegeneration(net.minecraft.world.entity.LivingEntity entity, double amount)
    Sets the LivingEntity's mana regeneration value.
    boolean
    setMaxMana(net.minecraft.world.entity.LivingEntity entity, double amount)
    Sets the LivingEntity's maximum mana value.
  • Method Details

    • getManaBase

      double getManaBase()
      Returns the base value used for calculating the maximum mana of a LivingEntity. Mana is calculated as base + getManaMultiplier() * (level - 1).
      Returns:
      The base value used for calculating maximum mana.
    • getManaMultiplier

      double getManaMultiplier()
      Returns the multiplier used for calculating the maximum mana of a LivingEntity. Mana is calculated as getManaBase() + multiplier * (level - 1).
      Returns:
      The multiplier used for calculating maximum mana.
    • getManaRegenerationMultiplier

      double getManaRegenerationMultiplier()
      Returns the multiplier used for calculating the mana regeneration of a LivingEntity. Mana is calculated as getManaBase() + getManaMultiplier() * (level - 1) * regeneration.
      Returns:
      The multiplier used for calculating mana regeneration.
    • getMana

      double getMana(net.minecraft.world.entity.LivingEntity entity)
      Parameters:
      entity - The LivingEntity to get the mana for.
      Returns:
      The mana value of the given LivingEntity.
    • getMaxMana

      double getMaxMana(net.minecraft.world.entity.LivingEntity entity)
      Parameters:
      entity - The LivingEntity to get the maximum mana for.
      Returns:
      The maximum mana value of the given LivingEntity.
    • getManaRegeneration

      double getManaRegeneration(net.minecraft.world.entity.LivingEntity entity)
      Parameters:
      entity - The LivingEntity to get the mana regeneration value for.
      Returns:
      The mana regeneration value of the given LivingEntity.
    • setMana

      boolean setMana(net.minecraft.world.entity.LivingEntity entity, double amount)
      Sets the LivingEntity's mana value.
      Parameters:
      entity - The LivingEntity to set the mana value on.
      amount - The mana value to set.
      Returns:
      Whether the operation was successful or not.
    • increaseMana

      boolean increaseMana(net.minecraft.world.entity.LivingEntity entity, double amount)
      Increases the LivingEntity's mana value.
      Parameters:
      entity - The LivingEntity to increase the mana value on.
      amount - The mana amount to increase by.
      Returns:
      Whether the operation was successful or not.
    • decreaseMana

      boolean decreaseMana(net.minecraft.world.entity.LivingEntity entity, double amount)
      Decreases the LivingEntity's mana value.
      Parameters:
      entity - The LivingEntity to decrease the mana value on.
      amount - The mana amount to decrease by.
      Returns:
      Whether the operation was successful or not.
    • setMaxMana

      boolean setMaxMana(net.minecraft.world.entity.LivingEntity entity, double amount)
      Sets the LivingEntity's maximum mana value.
      Parameters:
      entity - The LivingEntity to set the maximum mana value on.
      amount - The maximum mana value to set.
      Returns:
      Whether the operation was successful or not.
    • setManaRegeneration

      boolean setManaRegeneration(net.minecraft.world.entity.LivingEntity entity, double amount)
      Sets the LivingEntity's mana regeneration value.
      Parameters:
      entity - The LivingEntity to set the mana regeneration value on.
      amount - The mana regeneration value to set.
      Returns:
      Whether the operation was successful or not.