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 Type
    Method
    Description
    boolean
    isSpecializedFor(net.minecraft.world.item.ItemStack cell)
    Return true to prioritize this handler for the provided ItemStack.
    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 provided ItemStack.
      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 gui
      chest - to be opened chest
      cellHandler - cell handler
      cell - the storage cell