Class BlockWindow

java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.windows.Window
com.hypixel.hytale.server.core.entity.entities.player.windows.BlockWindow
All Implemented Interfaces:
ValidatedWindow
Direct Known Subclasses:
BenchWindow, ContainerBlockWindow

public abstract class BlockWindow extends Window implements ValidatedWindow
A window that is affiliated with a block at a specific position
  • Constructor Details

    • BlockWindow

      public BlockWindow(@Nonnull WindowType windowType, int x, int y, int z, int rotationIndex, @Nonnull BlockType blockType)
      Default Constructor for a BlockWindow instance
      Parameters:
      windowType - The window type affiliated with this window
      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 of the affiliated block
  • Method Details

    • getX

      public int getX()
      Returns:
      the X position of the block
    • getY

      public int getY()
      Returns:
      the Y position of the block
    • getZ

      public int getZ()
      Returns:
      the Z position of the block
    • getRotationIndex

      public int getRotationIndex()
      Returns:
      the rotation index of the block
    • getBlockType

      @Nonnull public BlockType getBlockType()
      Returns:
      the block type of the affiliated block
    • setMaxDistance

      public void setMaxDistance(double maxDistance)
      Sets the maximum distance allowed from the affiliated block before this window is closed
      Parameters:
      maxDistance - The max distance, in blocks, to set
    • getMaxDistance

      public double getMaxDistance()
      Returns:
      the maximum distance, in blocks, from the affiliated block
    • validate

      public boolean validate(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> store)
      Specified by:
      validate in interface ValidatedWindow
      Returns:
      true if the window activity is still valid, false otherwise