Package vazkii.botania.api.mana
Interface ManaItem
- All Known Implementing Classes:
BandOfManaItem.ManaItemImpl,GreaterBandOfManaItem.GreaterManaItemImpl,ManaMirrorItem.ManaItemImpl,ManaTabletItem.ManaItemImpl,TerraShattererItem.ManaItemImpl
public interface ManaItem
An item that has this capability can contain mana.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMana(int mana) Adds mana to this item.booleancanExportManaToItem(net.minecraft.world.item.ItemStack otherStack) Can this item export mana to another item?booleancanExportManaToPool(net.minecraft.world.level.block.entity.BlockEntity pool) Can this item export mana to a mana Pool?booleancanReceiveManaFromItem(net.minecraft.world.item.ItemStack otherStack) Can this item recieve mana from another item?booleancanReceiveManaFromPool(net.minecraft.world.level.block.entity.BlockEntity pool) Can this item receive mana from a mana Pool?intgetMana()Gets the amount of mana this item containsintGets the max amount of mana this item can hold.booleanIf this item simply does not export mana at all, set this to true.
-
Field Details
-
ID
static final net.minecraft.resources.ResourceLocation ID
-
-
Method Details
-
getMana
int getMana()Gets the amount of mana this item contains -
getMaxMana
int getMaxMana()Gets the max amount of mana this item can hold. -
addMana
void addMana(int mana) Adds mana to this item. -
canReceiveManaFromPool
boolean canReceiveManaFromPool(net.minecraft.world.level.block.entity.BlockEntity pool) Can this item receive mana from a mana Pool?- Parameters:
pool- The pool it's receiving mana from, can be casted to ManaPool.- See Also:
-
canReceiveManaFromItem
boolean canReceiveManaFromItem(net.minecraft.world.item.ItemStack otherStack) Can this item recieve mana from another item? -
canExportManaToPool
boolean canExportManaToPool(net.minecraft.world.level.block.entity.BlockEntity pool) Can this item export mana to a mana Pool?- Parameters:
pool- The pool it's exporting mana to, can be casted to ManaPool.- See Also:
-
canExportManaToItem
boolean canExportManaToItem(net.minecraft.world.item.ItemStack otherStack) Can this item export mana to another item? -
isNoExport
boolean isNoExport()If this item simply does not export mana at all, set this to true. This is used to skip items that contain mana but can't export it when drawing the mana bar above the XP bar.
-