Package net.glowstone.block.blocktype
Class BlockPiston
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.blocktype.BlockType
net.glowstone.block.blocktype.BlockDirectional
net.glowstone.block.blocktype.BlockPiston
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context
-
Field Summary
Fields inherited from class net.glowstone.block.blocktype.BlockType
ADJACENT, drops, placeSound, SIDES, soundGroup
-
Constructor Summary
ConstructorDescriptionCreates the basic (non-sticky) piston block type.BlockPiston
(boolean sticky) Creates a piston block type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
blockDestroy
(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face) Called when a player attempts to destroy a block.boolean
isSticky()
The piston is either non-sticky (default), or has a sticky behavior.void
Methods inherited from class net.glowstone.block.blocktype.BlockDirectional
calculateFace, getFace, getRawFace, placeBlock
Methods inherited from class net.glowstone.block.blocktype.BlockType
afterDestroy, afterPlace, blockInteract, canAbsorb, canOverride, canPlaceAt, canTickRandomly, createBlockEntity, getCastedBlockData, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, getSoundGroup, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onNearBlockChanged, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialData
Methods inherited from class net.glowstone.block.itemtype.ItemType
getContext, getMaterial, getMaterials, getMaxStackSize, rightClickAir, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
Constructor Details
-
BlockPiston
public BlockPiston()Creates the basic (non-sticky) piston block type. -
BlockPiston
public BlockPiston(boolean sticky) Creates a piston block type.- Parameters:
sticky
- true for the sticky-piston type; false for the basic piston type
-
-
Method Details
-
blockDestroy
Description copied from class:BlockType
Called when a player attempts to destroy a block.- Overrides:
blockDestroy
in classBlockType
- Parameters:
player
- The player interactingblock
- The block the player destroyedface
- The block face
-
onRedstoneUpdate
- Overrides:
onRedstoneUpdate
in classBlockType
-
isSticky
public boolean isSticky()The piston is either non-sticky (default), or has a sticky behavior.- Returns:
- true if the piston has a sticky base
-