aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-06-23 15:38:33 +0200
committerGitHub <noreply@github.com>2021-06-23 15:38:33 +0200
commit52d8c6bac0a7b48ee2eaf52074ed7c923f7268ee (patch)
treeffd06d19af09af2141c6dd0746df4e8faf24bba0 /src/Java
parent5b193cde280d9ed243cd594c43b2a41913205b5a (diff)
parent720cf90f99236263ceeb1237771e4da811e2310e (diff)
downloadGT5-Unofficial-52d8c6bac0a7b48ee2eaf52074ed7c923f7268ee.tar.gz
GT5-Unofficial-52d8c6bac0a7b48ee2eaf52074ed7c923f7268ee.tar.bz2
GT5-Unofficial-52d8c6bac0a7b48ee2eaf52074ed7c923f7268ee.zip
Merge pull request #7 from GTNewHorizons/fix-8098
Allow overriding the output space check via soldering tool
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 17bf67317b..fa87d9482f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -112,6 +112,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
private MultiblockRequirements mRequirements;
private boolean mInternalCircuit = false;
protected long mTotalRunTime = 0;
+ protected boolean mVoidExcess = false;
//Control Core Hatch
public ArrayList<GT_MetaTileEntity_Hatch_ControlCore> mControlCoreBus = new ArrayList<GT_MetaTileEntity_Hatch_ControlCore>();
@@ -484,7 +485,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
}
public int canBufferOutputs(final GT_Recipe aRecipe, int aParallelRecipes, boolean aAllow16SlotWithoutCheck) {
-
+ if (mVoidExcess) return aParallelRecipes;
log("Determining if we have space to buffer outputs. Parallel: "+aParallelRecipes);
// Null recipe or a recipe with lots of outputs?
@@ -2302,12 +2303,14 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
@Override
public void saveNBTData(NBTTagCompound aNBT) {
aNBT.setLong("mTotalRunTime", this.mTotalRunTime);
+ aNBT.setBoolean("mVoidExcess", this.mVoidExcess);
super.saveNBTData(aNBT);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
this.mTotalRunTime = aNBT.getLong("mTotalRunTime");
+ this.mVoidExcess = aNBT.getBoolean("mVoidExcess");
super.loadNBTData(aNBT);
}
@@ -2528,8 +2531,16 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult
return aSuper;
}
+ @Override
+ public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ boolean tSuper = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
+ if (aPlayer.isSneaking())
+ return tSuper;
+ mVoidExcess = !mVoidExcess;
+ return true;
+ }
- public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
boolean aHasCore = DEBUG_DISABLE_CORES_TEMPORARILY; //(requireControlCores ? (this.getControlCoreBus() != null) : true);
return aStructureCheck && aHasCore;