Interface IChestOrDrive
- All Superinterfaces:
IActionHost
- All Known Subinterfaces:
IMEChest
-
Method Summary
Modifier and TypeMethodDescriptionint@Nullable MEStoragegetCellInventory(int slot) Returns the storage for the given slot that has been attached to the ME Grid.@Nullable net.minecraft.world.item.ItemgetCellItem(int slot) Returns the item of the cell in the given slot or null.getCellStatus(int slot) @Nullable StorageCellgetOriginalCellInventory(int slot) Returns the inventory of the storage cell in the given slot or null.booleanisCellBlinking(int slot) booleanMethods inherited from interface IActionHost
getActionableNode
-
Method Details
-
getCellCount
int getCellCount()- Returns:
- how many slots are available. Chest has 1, Drive has 10.
-
getCellStatus
- 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
Returns the storage for the given slot that has been attached to the ME Grid. Interacting with this inventory (rather thangetOriginalCellInventory(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 asgetOriginalCellInventory(int). -
getOriginalCellInventory
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.
-