Interface Piston
-
- All Superinterfaces:
BlockEntity
,CopyableDataHolder
,DataHolder
,DataHolder.Mutable
,DataSerializable
,Locatable
,SerializableDataHolder
,SerializableDataHolder.Mutable
,ValueContainer
public interface Piston extends BlockEntity
Represents a piston moving in the world.As far as a
BlockEntity
is concerned, the piston block entity is a technical state of moving. The piston block entity is very short lived.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolder
SerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Value.Mutable<BlockState>
blockState()
default Value.Mutable<Boolean>
extending()
-
Methods inherited from interface org.spongepowered.api.block.entity.BlockEntity
block, copy, createArchetype, isValid, locatableBlock, mirror, mirror, rotate, rotate, setValid, type
-
Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawData
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutable
setRawData
-
-
-
-
Method Detail
-
blockState
default Value.Mutable<BlockState> blockState()
- Returns:
- The BlockState representing the block being pushed.
-
extending
default Value.Mutable<Boolean> extending()
- Returns:
- Whether this piston is extending or retracting.
-
-