Skip to content

Commit

Permalink
Ignore pistons for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Jan 14, 2021
1 parent df15be2 commit f3dcf40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/li/cil/oc2/common/entity/RobotEntity.java
Expand Up @@ -183,7 +183,9 @@ public void tick() {
final int z = iterator.getZ();
mutablePosition.setPos(x, y, z);
final BlockState blockState = world.getBlockState(mutablePosition);
if (blockState.isAir(world, mutablePosition)) {
if (blockState.isAir(world, mutablePosition) ||
blockState.isIn(Blocks.MOVING_PISTON) ||
blockState.isIn(Blocks.PISTON_HEAD)) {
continue;
}

Expand Down Expand Up @@ -315,6 +317,11 @@ protected boolean canTriggerWalking() {
protected void doBlockCollisions() {
}

@Override
protected Vector3d handlePistonMovement(final Vector3d pos) {
return Vector3d.ZERO;
}

///////////////////////////////////////////////////////////////////

@OnlyIn(Dist.CLIENT)
Expand Down

0 comments on commit f3dcf40

Please sign in to comment.