Interface ICellHandler


public interface ICellHandler
Implementations of this interface provide AE2 with a way to interact with storage cells that may be represented by arbitrary ItemStack
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable StorageCell
    getCellInventory(net.minecraft.world.item.ItemStack is, @Nullable ISaveProvider host)
    Returns the cell's inventory or null if the item stack is not handled by this handler, or it currently doesn't want to act as a storage cell.
    boolean
    isCell(net.minecraft.world.item.ItemStack is)
    return true if the provided item is handled by your cell handler.
  • Method Details

    • isCell

      boolean isCell(net.minecraft.world.item.ItemStack is)
      return true if the provided item is handled by your cell handler. ( AE May choose to skip this method, and just request a handler )
      Parameters:
      is - to be checked item
      Returns:
      return true, if getCellHandler will not return null.
    • getCellInventory

      @Nullable @Nullable StorageCell getCellInventory(net.minecraft.world.item.ItemStack is, @Nullable @Nullable ISaveProvider host)
      Returns the cell's inventory or null if the item stack is not handled by this handler, or it currently doesn't want to act as a storage cell.
      Parameters:
      is - a storage cell item.
      host - anytime the contents of your storage cell changes it should use this to request a save, please note, this value can be null. If provided, the host is responsible for persisting the cell content.
      Returns:
      The cell inventory or null if the stack is not a cell supported by this handler.