diff --git a/common/net/minecraft/src/buildcraft/factory/EntityMechanicalArm.java b/common/net/minecraft/src/buildcraft/factory/EntityMechanicalArm.java index 5efdcf58..d21d1856 100644 --- a/common/net/minecraft/src/buildcraft/factory/EntityMechanicalArm.java +++ b/common/net/minecraft/src/buildcraft/factory/EntityMechanicalArm.java @@ -12,6 +12,7 @@ package net.minecraft.src.buildcraft.factory; import net.minecraft.src.BuildCraftFactory; import net.minecraft.src.Entity; import net.minecraft.src.NBTTagCompound; +import net.minecraft.src.TileEntity; import net.minecraft.src.World; import net.minecraft.src.buildcraft.core.EntityBlock; @@ -31,13 +32,14 @@ public class EntityMechanicalArm extends Entity { public IArmListener listener; boolean inProgressionXZ = false; boolean inProgressionY = false; - + + protected TileEntity parent; + public EntityMechanicalArm(World world) { super(world); } - public EntityMechanicalArm(World world, double i, double j, double k, - double width, double height) { + public EntityMechanicalArm(World world, double i, double j, double k, double width, double height, TileEntity parent) { super(world); setPosition(i, j, k); @@ -79,6 +81,8 @@ public class EntityMechanicalArm extends Entity { head.shadowSize = 1.0F; updatePosition(); + + this.parent = parent; } @Override @@ -186,6 +190,12 @@ public class EntityMechanicalArm extends Entity { @Override public void onUpdate() { + + if (parent != null && worldObj.getBlockTileEntity(parent.xCoord, parent.yCoord, parent.zCoord) != parent) { + setDead(); + return; + } + if (speed > 0) { doMove(speed); } diff --git a/common/net/minecraft/src/buildcraft/factory/TileQuarry.java b/common/net/minecraft/src/buildcraft/factory/TileQuarry.java index d0056c87..6f31ed0f 100644 --- a/common/net/minecraft/src/buildcraft/factory/TileQuarry.java +++ b/common/net/minecraft/src/buildcraft/factory/TileQuarry.java @@ -120,7 +120,7 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, yCoord + bluePrintBuilder.bluePrint.sizeY - 1 + Utils.pipeMinPos, box.zMin + Utils.pipeMaxPos, bluePrintBuilder.bluePrint.sizeX - 2 + Utils.pipeMinPos * 2, - bluePrintBuilder.bluePrint.sizeZ - 2 + Utils.pipeMinPos * 2); + bluePrintBuilder.bluePrint.sizeZ - 2 + Utils.pipeMinPos * 2, this); arm.listener = this; loadArm = true; @@ -456,8 +456,9 @@ public class TileQuarry extends TileMachine implements IArmListener, IMachine, } @Override - public void invalidate() { - destroy(); + public void invalidate () { + System.out.println("hi"); + destroy (); } @Override