Avoid unnecessary piston contraption assembling

This commit is contained in:
Snownee 2021-02-13 14:14:28 +08:00
parent dae651c046
commit 2d2c7e653f

View File

@ -46,6 +46,8 @@ public class MechanicalPistonTileEntity extends LinearActuatorTileEntity {
if (!(world.getBlockState(pos) if (!(world.getBlockState(pos)
.getBlock() instanceof MechanicalPistonBlock)) .getBlock() instanceof MechanicalPistonBlock))
return; return;
if (getMovementSpeed() == 0)
return;
Direction direction = getBlockState().get(BlockStateProperties.FACING); Direction direction = getBlockState().get(BlockStateProperties.FACING);