Fix infinite miningpipes exploit from advanced miner 2
This commit is contained in:
parent
dcfa9c5df9
commit
77a163e0e4
1 changed files with 4 additions and 5 deletions
|
@ -71,18 +71,17 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas
|
||||||
ArrayList<ItemStack> tItems = getStoredInputs();
|
ArrayList<ItemStack> tItems = getStoredInputs();
|
||||||
for (ItemStack tStack : tItems) {
|
for (ItemStack tStack : tItems) {
|
||||||
if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
|
||||||
if (tStack.stackSize < 2) {
|
|
||||||
tStack = null;
|
|
||||||
} else {
|
|
||||||
tStack.stackSize--;
|
tStack.stackSize--;
|
||||||
|
if (tStack.stackSize < 1) {
|
||||||
|
tStack = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
if (mInventory[1] == null) {
|
if (mInventory[1] == null) {
|
||||||
mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
|
mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
|
||||||
} else {
|
} else {
|
||||||
mInventory[1].stackSize++;
|
mInventory[1].stackSize++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mInputHatches == null || mInputHatches.get(0).mFluid == null || mInputHatches.get(0).mFluid.getFluid().getID() != ItemList.sDrillingFluid.getID()) {
|
if (mInputHatches == null || mInputHatches.get(0).mFluid == null || mInputHatches.get(0).mFluid.getFluid().getID() != ItemList.sDrillingFluid.getID()) {
|
||||||
|
|
Loading…
Reference in a new issue