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)
.getBlock() instanceof MechanicalPistonBlock))
return;
if (getMovementSpeed() == 0)
return;
Direction direction = getBlockState().get(BlockStateProperties.FACING);