Class ContainerBlockWindow

All Implemented Interfaces:
ItemContainerWindow, ValidatedWindow

public class ContainerBlockWindow extends BlockWindow implements ItemContainerWindow
A block window that is affiliated with a container block
Since:
22/4/17.
Version:
1.0
  • Constructor Details

    • ContainerBlockWindow

      public ContainerBlockWindow(int x, int y, int z, int rotationIndex, @Nonnull BlockType blockType, @Nonnull ItemContainer itemContainer)
      Default Constructor for a ContainerBlockWindow instance
      Parameters:
      x - The X position of the block
      y - The Y position of the block
      z - The Z position of the block
      rotationIndex - The rotation index of the block
      blockType - The block type affiliated with the block
      itemContainer - The item container of the block
  • Method Details

    • getData

      @Nonnull public com.google.gson.JsonObject getData()
      Specified by:
      getData in class Window
      Returns:
      the JsonObject data affiliated with this window
    • onOpen0

      public boolean onOpen0(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store)
    • onClose0

      public void onClose0(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • getItemContainer

      @Nonnull public ItemContainer getItemContainer()
      Specified by:
      getItemContainer in interface ItemContainerWindow
      Returns:
      the item container instance affiliated with the window
    • handleAction

      public void handleAction(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull WindowAction action)
      Description copied from class: Window
      Called to handle the given action for this window
      Overrides:
      handleAction in class Window
      Parameters:
      ref - The entity ref of the affiliated entity
      store - The entity store for component access
      action - The window action to handle