Interface ManaItem

All Known Implementing Classes:
DefaultManaItemImpl

public interface ManaItem
An item that has this capability can contain mana.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
  • 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.
  • 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.