Contents
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
A window that is affiliated with a block at a specific position
-
Nested Class Summary
Nested classes/interfaces inherited from class Window
Window.WindowCloseEvent -
Field Summary
Fields inherited from class Window
CLIENT_REQUESTABLE_WINDOW_TYPES -
Constructor Summary
ConstructorsConstructorDescriptionBlockWindow(WindowType windowType, int x, int y, int z, int rotationIndex, BlockType blockType) Default Constructor for aBlockWindowinstance -
Method Summary
Modifier and TypeMethodDescriptiondoubleintintgetX()intgetY()intgetZ()voidsetMaxDistance(double maxDistance) Sets the maximum distance allowed from the affiliated block before this window is closedbooleanvalidate(Ref<EntityStore> ref, ComponentAccessor<EntityStore> store) Methods inherited from class Window
close, equals, getData, getId, getPlayerRef, getType, handleAction, hashCode, init, registerCloseEvent, registerCloseEvent, registerCloseEvent, setId
-
Constructor Details
-
BlockWindow
public BlockWindow(@Nonnull WindowType windowType, int x, int y, int z, int rotationIndex, @Nonnull BlockType blockType) Default Constructor for aBlockWindowinstance- Parameters:
windowType- The window type affiliated with this windowx- The X position of the blocky- The Y position of the blockz- The Z position of the blockrotationIndex- The rotation index of the blockblockType- 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
- 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:
validatein interfaceValidatedWindow- Returns:
trueif the window activity is still valid,falseotherwise
-