Interface IChestOrDrive

All Superinterfaces:
IActionHost
All Known Subinterfaces:
IMEChest

public interface IChestOrDrive extends IActionHost
  • Method Details

    • getCellCount

      int getCellCount()
      Returns:
      how many slots are available. Chest has 1, Drive has 10.
    • getCellStatus

      CellState getCellStatus(int slot)
      Parameters:
      slot - slot index
      Returns:
      status of the slot, one of the above indices.
    • isPowered

      boolean isPowered()
      Returns:
      if the device is online you should check this before providing any other information.
    • isCellBlinking

      boolean isCellBlinking(int slot)
      Parameters:
      slot - slot index
      Returns:
      is the cell currently blinking to show activity.
    • getCellItem

      @Nullable @Nullable net.minecraft.world.item.Item getCellItem(int slot)
      Returns the item of the cell in the given slot or null.
    • getCellInventory

      @Nullable @Nullable MEStorage getCellInventory(int slot)
      Returns the storage for the given slot that has been attached to the ME Grid. Interacting with this inventory (rather than getOriginalCellInventory(int)) will update the visual state of the cell in this inventory.

      The storage returned from this method may or may not be the same object as getOriginalCellInventory(int).

    • getOriginalCellInventory

      @Nullable @Nullable StorageCell getOriginalCellInventory(int slot)
      Returns the inventory of the storage cell in the given slot or null.
      NOTE: Interacting with this inventory directly will bypass any monitoring done by chests or drives and thus may not properly update things like LED colours.