net.minecraft.block.entity

public class PistonBlockEntity

extends BlockEntity

All mapped superinterfaces:

DebugTrackable, EntryConvertible

net.minecraft.world.level.block.piston.PistonMovingBlockEntity
net.minecraft.class_2669
net.minecraft.block.entity.PistonBlockEntity

Field summary

Modifier and TypeField
private static final int
TICKS_TO_EXTEND
field_31382
field_31382
private static final double
PUSH_OFFSET
field_31383
field_31383
public static final double
TICK_MOVEMENT
field_31381
field_31381
private static final BlockState
DEFAULT_BLOCK_STATE
field_57804
DEFAULT_PUSHED_BLOCK_STATE
private static final float
DEFAULT_PROGRESS
field_57805
DEFAULT_PROGRESS
private static final boolean
DEFAULT_EXTENDING
field_57806
DEFAULT_EXTENDING
private static final boolean
DEFAULT_SOURCE
field_57807
DEFAULT_SOURCE
private BlockState
movedState
field_12204
pushedBlockState
private Direction
direction
field_12201
facing
private boolean
extending
field_12203
extending
private boolean
isSourcePiston
field_12202
source
private static final ThreadLocal<Direction>
NOCLIP
field_12205
ENTITY_MOVEMENT_DIRECTION
private float
progress
field_12207
progress
private float
progressO
field_12206
lastProgress
private long
lastTicked
field_12208
savedWorldTime
private int
deathTicks
field_26705
field_26705

Constructor summary

ModifierConstructor
public (BlockPos pos, BlockState state)
public (BlockPos pos, BlockState state, BlockState pushedBlock, Direction facing, boolean extending, boolean source)

Method summary

Modifier and TypeMethod
public NbtCompound
getUpdateTag(HolderLookup$Provider registries)
method_16887(class_7225$class_7874 arg0)
toInitialChunkDataNbt(RegistryWrapper$WrapperLookup arg0)
public boolean
isExtending()
method_11501()
isExtending()
public Direction
getDirection()
method_11498()
getFacing()
public boolean
isSourcePiston()
method_11515()
isSource()
public float
getProgress(float a)
method_11499(float arg0)
getProgress(float tickProgress)
public float
getXOff(float a)
method_11494(float arg0)
getRenderOffsetX(float tickProgress)
public float
getYOff(float a)
method_11511(float arg0)
getRenderOffsetY(float tickProgress)
public float
getZOff(float a)
method_11507(float arg0)
getRenderOffsetZ(float tickProgress)
private float
getExtendedProgress(float progress)
method_11504(float arg0)
getAmountExtended(float progress)
private BlockState
getCollisionRelatedBlockState()
method_11496()
getHeadBlockState()
private static void
moveCollidedEntities(Level level, BlockPos pos, float newProgress, PistonMovingBlockEntity self)
method_11503(class_1937 arg0, class_2338 arg1, float arg2, class_2669 arg3)
pushEntities(World world, BlockPos pos, float arg2, PistonBlockEntity blockEntity)
private static void
moveEntityByPiston(Direction pistonDirection, Entity entity, double delta, Direction movement)
method_23672(class_2350 arg0, class_1297 arg1, double arg2, class_2350 arg3)
moveEntity(Direction direction, Entity entity, double distance, Direction movementDirection)
private static void
moveStuckEntities(Level level, BlockPos pos, float newProgress, PistonMovingBlockEntity self)
method_23674(class_1937 arg0, class_2338 arg1, float arg2, class_2669 arg3)
moveEntitiesInHoneyBlock(World world, BlockPos pos, float arg2, PistonBlockEntity blockEntity)
private static boolean
matchesStickyCritera(AABB aabb, Entity entity, BlockPos pos)
method_23671(class_238 arg0, class_1297 arg1, class_2338 arg2)
canMoveEntity(Box box, Entity entity, BlockPos pos)
private boolean
isStickyForEntities()
method_23364()
isPushingHoneyBlock()
public Direction
getMovementDirection()
method_11506()
getMovementDirection()
private static double
getMovement(AABB aabbToBeOutsideOf, Direction movement, AABB aabb)
method_11497(class_238 arg0, class_2350 arg1, class_238 arg2)
getIntersectionSize(Box arg0, Direction arg1, Box arg2)
private static Box
moveByPositionAndProgress(BlockPos pos, AABB aabb, PistonMovingBlockEntity entity)
method_11500(class_2338 arg0, class_238 arg1, class_2669 arg2)
offsetHeadBox(BlockPos pos, Box box, PistonBlockEntity blockEntity)
private static void
fixEntityWithinPistonBase(BlockPos pos, Entity entity, Direction direction, double deltaProgress)
method_11514(class_2338 arg0, class_1297 arg1, class_2350 arg2, double arg3)
push(BlockPos pos, Entity entity, Direction direction, double amount)
public BlockState
getMovedState()
method_11495()
getPushedBlock()
public void
finalTick()
method_11513()
finish()
public void
preRemoveSideEffects(BlockPos pos, BlockState state)
method_66473(class_2338 arg0, class_2680 arg1)
onBlockReplaced(BlockPos arg0, BlockState arg1)
public Direction
getPushDirection()
method_61764()
getDirection()
public static void
tick(Level level, BlockPos pos, BlockState state, PistonMovingBlockEntity entity)
method_31707(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_2669 arg3)
tick(World world, BlockPos pos, BlockState state, PistonBlockEntity blockEntity)
protected void
loadAdditional(ValueInput input)
method_11014(class_11368 arg0)
readData(ReadView arg0)
protected void
saveAdditional(ValueOutput output)
method_11007(class_11372 arg0)
writeData(WriteView arg0)
public VoxelShape
getCollisionShape(BlockGetter level, BlockPos pos)
method_11512(class_1922 arg0, class_2338 arg1)
getCollisionShape(BlockView world, BlockPos pos)
public long
getLastTicked()
method_11508()
getSavedWorldTime()
public void
setLevel(Level level)
method_31662(class_1937 arg0)
setWorld(World arg0)
private static boolean
lambda$moveStuckEntities$0(AABB arg0, BlockPos arg1, Entity arg2)
method_23673(class_238 arg0, class_2338 arg1, class_1297 arg2)
method_23673(Box arg0, BlockPos arg1, Entity entity)
private static Direction
lambda$static$0()
method_21866()
method_21866()