public class PistonBlockEntity extends BlockEntity implements Tickable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
extending |
private Direction |
facing |
private static ThreadLocal<Direction> |
field_12205 |
private int |
field_26705 |
private float |
lastProgress |
private float |
progress |
private BlockState |
pushedBlock |
private long |
savedWorldTime |
private boolean |
source |
pos, removed, world| Constructor and Description |
|---|
PistonBlockEntity() |
PistonBlockEntity(BlockState pushedBlock,
Direction facing,
boolean extending,
boolean source) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish() |
void |
fromTag(BlockState state,
CompoundTag tag) |
private float |
getAmountExtended(float progress) |
VoxelShape |
getCollisionShape(BlockView world,
BlockPos pos) |
Direction |
getFacing() |
private BlockState |
getHeadBlockState() |
private static double |
getIntersectionSize(Box box,
Direction direction,
Box box2) |
Direction |
getMovementDirection() |
float |
getProgress(float tickDelta) |
BlockState |
getPushedBlock() |
float |
getRenderOffsetX(float tickDelta) |
float |
getRenderOffsetY(float tickDelta) |
float |
getRenderOffsetZ(float tickDelta) |
long |
getSavedWorldTime() |
double |
getSquaredRenderDistance() |
boolean |
isExtending() |
private boolean |
isPushingHoneyBlock() |
boolean |
isSource() |
private static boolean |
method_23671(Box box,
Entity entity) |
private static void |
method_23672(Direction direction,
Entity entity,
double double2,
Direction direction2) |
private void |
method_23674(float float2) |
private Box |
offsetHeadBox(Box box) |
private void |
push(Entity entity,
Direction direction,
double amount) |
private void |
pushEntities(float nextProgress) |
void |
tick() |
CompoundTag |
toInitialChunkDataTag() |
CompoundTag |
toTag(CompoundTag tag) |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toUpdatePacketprivate static final ThreadLocal<Direction> field_12205
private BlockState pushedBlock
private Direction facing
private boolean extending
private boolean source
private float progress
private float lastProgress
private long savedWorldTime
private int field_26705
public PistonBlockEntity()
public PistonBlockEntity(BlockState pushedBlock, Direction facing, boolean extending, boolean source)
public CompoundTag toInitialChunkDataTag()
toInitialChunkDataTag in class BlockEntitypublic boolean isExtending()
public Direction getFacing()
public boolean isSource()
public float getProgress(float tickDelta)
@Environment(value=CLIENT) public float getRenderOffsetX(float tickDelta)
@Environment(value=CLIENT) public float getRenderOffsetY(float tickDelta)
@Environment(value=CLIENT) public float getRenderOffsetZ(float tickDelta)
private float getAmountExtended(float progress)
private BlockState getHeadBlockState()
private void pushEntities(float nextProgress)
private static void method_23672(Direction direction, Entity entity, double double2, Direction direction2)
private void method_23674(float float2)
private boolean isPushingHoneyBlock()
public Direction getMovementDirection()
private static double getIntersectionSize(Box box, Direction direction, Box box2)
public BlockState getPushedBlock()
public void finish()
public void fromTag(BlockState state, CompoundTag tag)
fromTag in class BlockEntitypublic CompoundTag toTag(CompoundTag tag)
toTag in class BlockEntitypublic VoxelShape getCollisionShape(BlockView world, BlockPos pos)
public long getSavedWorldTime()
@Environment(value=CLIENT) public double getSquaredRenderDistance()
getSquaredRenderDistance in class BlockEntity