public class PistonHandler extends Object
Modifier and Type | Field and Description |
---|---|
private List<BlockPos> |
brokenBlocks |
private Direction |
motionDirection |
private List<BlockPos> |
movedBlocks |
private Direction |
pistonDirection |
private BlockPos |
posFrom |
private BlockPos |
posTo |
private boolean |
retracted |
private World |
world |
Constructor and Description |
---|
PistonHandler(World world,
BlockPos pos,
Direction dir,
boolean retracted) |
Modifier and Type | Method and Description |
---|---|
boolean |
calculatePush() |
private boolean |
canMoveAdjacentBlock(BlockPos pos) |
List<BlockPos> |
getBrokenBlocks() |
List<BlockPos> |
getMovedBlocks() |
private static boolean |
isAdjacentBlockStuck(Block block,
Block block2) |
private static boolean |
isBlockSticky(Block block) |
private void |
setMovedBlocks(int from,
int to) |
private boolean |
tryMove(BlockPos pos,
Direction dir) |
private final World world
private final BlockPos posFrom
private final boolean retracted
private final BlockPos posTo
private final Direction motionDirection
private final Direction pistonDirection