Package appeng.api.storage.cells
Interface ICellGuiHandler
public interface ICellGuiHandler
This interface is used by the ME Chest to open the appropriate GUI when a storage cell is inserted into the chest,
and the player right-clicks the terminal screen on the chest. Since any storage cell may be inserted into the chest,
this can potentially open a terminal screen provided by an addon, and this interface allows addons to facilitate
that.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isSpecializedFor
(net.minecraft.world.item.ItemStack cell) Return true to prioritize this handler for the providedItemStack
.void
openChestGui
(net.minecraft.world.entity.player.Player player, IChestOrDrive chest, ICellHandler cellHandler, net.minecraft.world.item.ItemStack cell) Called when the storage cell is placed in an ME Chest and the user tries to open the terminal side, if your item is not available via ME Chests simply tell the user they can't use it, or something, otherwise you should open your gui and display the cell to the user.
-
Method Details
-
isSpecializedFor
boolean isSpecializedFor(net.minecraft.world.item.ItemStack cell) Return true to prioritize this handler for the providedItemStack
.- Parameters:
cell
- Cell ItemStack- Returns:
- True, if specialized else false.
-
openChestGui
void openChestGui(net.minecraft.world.entity.player.Player player, IChestOrDrive chest, ICellHandler cellHandler, net.minecraft.world.item.ItemStack cell) Called when the storage cell is placed in an ME Chest and the user tries to open the terminal side, if your item is not available via ME Chests simply tell the user they can't use it, or something, otherwise you should open your gui and display the cell to the user.- Parameters:
player
- player opening chest guichest
- to be opened chestcellHandler
- cell handlercell
- the storage cell
-