Class PistonBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.PistonBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.Piston
public class PistonBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Piston
- Author:
- CreeperFace
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanorg.cloudburstmc.api.util.DirectionbooleanFields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionPistonBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatbooleanbooleanisSticky()booleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsetPowered(boolean powered)voidsetSticky(boolean sticky)Methods inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
close, getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServer, getServerTag, getTag, getType, hasCustomName, init, isClosed, isMovable, isSpawnable, onBreak, onUpdate, saveClientData, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClient, updateNbtMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.blockentity.BlockEntity
close, getBlock, getBlockState, getCustomName, getLevel, getPosition, getType, hasCustomName, isClosed, isMovable, isSpawnable, onBreak, onUpdate, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll
-
Field Details
-
facing
public org.cloudburstmc.api.util.Direction facing -
extending
public boolean extending -
powered
public boolean powered
-
-
Constructor Details
-
PistonBlockEntity
public PistonBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position)
-
-
Method Details
-
loadAdditionalData
public void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)- Overrides:
loadAdditionalDatain classBaseBlockEntity
-
saveAdditionalData
public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveAdditionalDatain classBaseBlockEntity
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
getProgress
public float getProgress() -
getLastProgress
public float getLastProgress() -
isSticky
public boolean isSticky()- Specified by:
isStickyin interfaceorg.cloudburstmc.api.blockentity.Piston
-
setSticky
public void setSticky(boolean sticky)- Specified by:
setStickyin interfaceorg.cloudburstmc.api.blockentity.Piston
-
isPowered
public boolean isPowered()- Specified by:
isPoweredin interfaceorg.cloudburstmc.api.blockentity.Piston
-
setPowered
public void setPowered(boolean powered)- Specified by:
setPoweredin interfaceorg.cloudburstmc.api.blockentity.Piston
-