Package io.papermc.paper.block
Interface MovingPiston
- All Superinterfaces:
BlockState
,Metadatable
,PersistentDataHolder
,PersistentDataViewHolder
,TileState
-
Method Summary
Modifier and TypeMethodDescriptionThe direction that the current moving piston is pushing/pulling a block in.Gets the block that is being pushedboolean
Gets if the piston is extending or not.boolean
Returns if this moving piston represents the main piston head from the original piston.Methods inherited from interface org.bukkit.block.BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Method Details
-
getMovingBlock
BlockData getMovingBlock()Gets the block that is being pushed- Returns:
- the pushed block
-
getDirection
BlockFace getDirection()The direction that the current moving piston is pushing/pulling a block in.- Returns:
- the direction
-
isExtending
boolean isExtending()Gets if the piston is extending or not. Returns false if the piston is retracting.- Returns:
- is extending or not
-
isPistonHead
boolean isPistonHead()Returns if this moving piston represents the main piston head from the original piston.- Returns:
- is the piston head or not
-