Interface ManaHelper
public interface ManaHelper
Helper for mana-related operations.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandecreaseMana(net.minecraft.world.entity.LivingEntity entity, double amount) Decreases theLivingEntity's mana value.doublegetMana(net.minecraft.world.entity.LivingEntity entity) doubleReturns the base value used for calculating the maximum mana of aLivingEntity.doubleReturns the multiplier used for calculating the maximum mana of aLivingEntity.doublegetManaRegeneration(net.minecraft.world.entity.LivingEntity entity) doubleReturns the multiplier used for calculating the mana regeneration of aLivingEntity.doublegetMaxMana(net.minecraft.world.entity.LivingEntity entity) booleanincreaseMana(net.minecraft.world.entity.LivingEntity entity, double amount) Increases theLivingEntity's mana value.booleansetMana(net.minecraft.world.entity.LivingEntity entity, double amount) Sets theLivingEntity's mana value.booleansetManaRegeneration(net.minecraft.world.entity.LivingEntity entity, double amount) Sets theLivingEntity's mana regeneration value.booleansetMaxMana(net.minecraft.world.entity.LivingEntity entity, double amount) Sets theLivingEntity's maximum mana value.
-
Method Details
-
getManaBase
double getManaBase()Returns the base value used for calculating the maximum mana of aLivingEntity. 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 aLivingEntity. Mana is calculated asgetManaBase()+ multiplier * (level - 1).- Returns:
- The multiplier used for calculating maximum mana.
-
getManaRegenerationMultiplier
double getManaRegenerationMultiplier()Returns the multiplier used for calculating the mana regeneration of aLivingEntity. Mana is calculated asgetManaBase()+getManaMultiplier()* (level - 1) * regeneration.- Returns:
- The multiplier used for calculating mana regeneration.
-
getMana
double getMana(net.minecraft.world.entity.LivingEntity entity) - Parameters:
entity- TheLivingEntityto get the mana for.- Returns:
- The mana value of the given
LivingEntity.
-
getMaxMana
double getMaxMana(net.minecraft.world.entity.LivingEntity entity) - Parameters:
entity- TheLivingEntityto 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- TheLivingEntityto 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 theLivingEntity's mana value.- Parameters:
entity- TheLivingEntityto 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 theLivingEntity's mana value.- Parameters:
entity- TheLivingEntityto 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 theLivingEntity's mana value.- Parameters:
entity- TheLivingEntityto 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 theLivingEntity's maximum mana value.- Parameters:
entity- TheLivingEntityto 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 theLivingEntity's mana regeneration value.- Parameters:
entity- TheLivingEntityto set the mana regeneration value on.amount- The mana regeneration value to set.- Returns:
- Whether the operation was successful or not.
-