Class BenchWindow

All Implemented Interfaces:
MaterialContainerWindow, ValidatedWindow
Direct Known Subclasses:
CraftingWindow, ProcessingBenchWindow

public abstract class BenchWindow extends BlockWindow implements MaterialContainerWindow
  • Constructor Details

    • BenchWindow

      public BenchWindow(@Nonnull WindowType windowType, int x, int y, int z, int rotationIndex, @Nonnull BlockType blockType, @Nonnull BenchBlock benchBlock)
      Constructor for a BenchWindow instance with explicit position.
      Parameters:
      windowType - The window type affiliated with this window
      x - The X position of the bench
      y - The Y position of the bench
      z - The Z position of the bench
      rotationIndex - The rotation index of the bench
      blockType - The block type of the bench
      benchBlock - The associated BenchBlock component
  • Method Details

    • getData

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

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

      public void setBlockInteractionState(@Nonnull String state, @Nonnull World world)
      Called to set the block interaction state at the window's position
      Parameters:
      state - The interaction state to set.
      world - The world to set the block in.
    • updateQueueSize

      public void updateQueueSize(int size)
    • updateCraftingJob

      public void updateCraftingJob(float percent)
    • updateBenchUpgradeJob

      public void updateBenchUpgradeJob(float percent)
    • updateBenchTierLevel

      public void updateBenchTierLevel(int newValue)
    • getExtraResourcesSection

      @Nonnull public MaterialExtraResourcesSection getExtraResourcesSection()
      Description copied from interface: MaterialContainerWindow
      Gets the extra resources section of this material container window
      Specified by:
      getExtraResourcesSection in interface MaterialContainerWindow
      Returns:
      The extra resources section
    • invalidateExtraResources

      public void invalidateExtraResources()
      Specified by:
      invalidateExtraResources in interface MaterialContainerWindow
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface MaterialContainerWindow