Turn off AdvMinerII and OilDrill once work is done.

This commit is contained in:
Blood-Asp 2016-11-02 23:14:40 +01:00
parent 481580b723
commit 8a17c67442
2 changed files with 7 additions and 1 deletions

View file

@ -128,6 +128,7 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas
moveOneDown();
}
}else{
stopMachine();
return false;
}
}
@ -213,18 +214,22 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas
private boolean moveOneDown() {
if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1)
|| (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
stopMachine();
return false;
}
int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
int yHead = getYOfPumpHead();
if (yHead <= 0) {
stopMachine();
return false;
}
if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
stopMachine();
return false;
}
if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
stopMachine();
return false;
}
if (yHead != getBaseMetaTileEntity().getYCoord()) {

View file

@ -85,6 +85,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase
if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4))
completedCycle = true;
} else if (tFluid.amount < 5000) {
stopMachine();
return false;
} else {
tFluid.amount = tFluid.amount / 5000;