Class BandOfManaItem.ManaItemImpl

java.lang.Object
vazkii.botania.common.item.equipment.bauble.BandOfManaItem.ManaItemImpl
All Implemented Interfaces:
ManaItem
Direct Known Subclasses:
GreaterBandOfManaItem.GreaterManaItemImpl
Enclosing class:
BandOfManaItem

public static class BandOfManaItem.ManaItemImpl extends Object implements ManaItem
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.world.item.ItemStack
     

    Fields inherited from interface vazkii.botania.api.mana.ManaItem

    ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManaItemImpl(net.minecraft.world.item.ItemStack stack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMana(int mana)
    Adds mana to this item.
    boolean
    canExportManaToItem(net.minecraft.world.item.ItemStack otherStack)
    Can this item export mana to another item?
    boolean
    canExportManaToPool(net.minecraft.world.level.block.entity.BlockEntity pool)
    Can this item export mana to a mana Pool?
    boolean
    canReceiveManaFromItem(net.minecraft.world.item.ItemStack otherStack)
    Can this item recieve mana from another item?
    boolean
    canReceiveManaFromPool(net.minecraft.world.level.block.entity.BlockEntity pool)
    Can this item receive mana from a mana Pool?
    int
    Gets the amount of mana this item contains
    int
    Gets the max amount of mana this item can hold.
    boolean
    If this item simply does not export mana at all, set this to true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stack

      protected final net.minecraft.world.item.ItemStack stack
  • Constructor Details

    • ManaItemImpl

      public ManaItemImpl(net.minecraft.world.item.ItemStack stack)
  • Method Details

    • getMana

      public int getMana()
      Description copied from interface: ManaItem
      Gets the amount of mana this item contains
      Specified by:
      getMana in interface ManaItem
    • getMaxMana

      public int getMaxMana()
      Description copied from interface: ManaItem
      Gets the max amount of mana this item can hold.
      Specified by:
      getMaxMana in interface ManaItem
    • addMana

      public void addMana(int mana)
      Description copied from interface: ManaItem
      Adds mana to this item.
      Specified by:
      addMana in interface ManaItem
    • canReceiveManaFromPool

      public boolean canReceiveManaFromPool(net.minecraft.world.level.block.entity.BlockEntity pool)
      Description copied from interface: ManaItem
      Can this item receive mana from a mana Pool?
      Specified by:
      canReceiveManaFromPool in interface ManaItem
      Parameters:
      pool - The pool it's receiving mana from, can be casted to ManaPool.
      See Also:
    • canReceiveManaFromItem

      public boolean canReceiveManaFromItem(net.minecraft.world.item.ItemStack otherStack)
      Description copied from interface: ManaItem
      Can this item recieve mana from another item?
      Specified by:
      canReceiveManaFromItem in interface ManaItem
    • canExportManaToPool

      public boolean canExportManaToPool(net.minecraft.world.level.block.entity.BlockEntity pool)
      Description copied from interface: ManaItem
      Can this item export mana to a mana Pool?
      Specified by:
      canExportManaToPool in interface ManaItem
      Parameters:
      pool - The pool it's exporting mana to, can be casted to ManaPool.
      See Also:
    • canExportManaToItem

      public boolean canExportManaToItem(net.minecraft.world.item.ItemStack otherStack)
      Description copied from interface: ManaItem
      Can this item export mana to another item?
      Specified by:
      canExportManaToItem in interface ManaItem
    • isNoExport

      public boolean isNoExport()
      Description copied from interface: ManaItem
      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.
      Specified by:
      isNoExport in interface ManaItem