From 8a17c674425a84426e59bcc699830ea0c36b5565 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 2 Nov 2016 23:14:40 +0100 Subject: [PATCH] Turn off AdvMinerII and OilDrill once work is done. --- .../machines/multi/GT_MetaTileEntity_AdvMiner2.java | 7 ++++++- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java index a6028b54..0fcb84c3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java @@ -128,6 +128,7 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas moveOneDown(); } }else{ + stopMachine(); return false; } } @@ -213,19 +214,23 @@ 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))))) { - return false; + stopMachine(); + return false; } if (yHead != getBaseMetaTileEntity().getYCoord()) { getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 2681387a..5742320a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -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;