aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-31 03:49:33 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-31 03:49:33 +0000
commitc0daba1659c667342da1529c31896a98768a8eda (patch)
treee1e1f25c265c63fb2dbbb5c113e941a92e9cfa4c /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base
parent241df1134f16c6c9c54b198db97279d697de8c77 (diff)
downloadGT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.gz
GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.bz2
GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.zip
+ Added a config option for control cores. Someone should definitely test this works as expected.
% Reduced cost of Hatch_Control_Core recipe. % Minor tweaks to Fish Traps. $ Fixed inventory shuffling for some Tile Entities. $ Fixed Super Jukebox, it's now mostly functional. $ Fixed constructBaseMetaTileEntity returning the wrong type of Entity for pre-existing wooden pipes, this should now get caught and thrown if the GT++ entity fails to a ClassCastException.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java23
1 files changed, 17 insertions, 6 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 41ba313b0e..39666a2d3b 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
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
import java.lang.reflect.InvocationTargetException;
@@ -198,7 +199,7 @@ GT_MetaTileEntity_MultiBlockBase {
}
}
- int tTier = this.getControlCoreTier();
+ int tTier = requireControlCores ? this.getControlCoreTier() : -1;
mInfo.add(getMachineTooltip());
@@ -502,7 +503,7 @@ GT_MetaTileEntity_MultiBlockBase {
int aControlCoreTier = getControlCoreTier();
//If no core, return false;
- if (aControlCoreTier == 0) {
+ if (aControlCoreTier == 0 && requireControlCores) {
log("No control core found.");
return false;
}
@@ -519,7 +520,7 @@ GT_MetaTileEntity_MultiBlockBase {
log("Running checkRecipeGeneric(0)");
//Check to see if Voltage Tier > Control Core Tier
- if (tTier > aControlCoreTier) {
+ if (tTier > aControlCoreTier && requireControlCores) {
log("Control core found is lower tier than power tier.");
return false;
}
@@ -586,7 +587,7 @@ GT_MetaTileEntity_MultiBlockBase {
//Only Overclock as high as the control circuit.
byte tTierOld = tTier;
- tTier = (byte) aControlCoreTier;
+ tTier = requireControlCores ? (byte) aControlCoreTier : tTierOld;
// Overclock
if (this.mEUt <= 16) {
@@ -888,7 +889,14 @@ GT_MetaTileEntity_MultiBlockBase {
return false;
}
- public int getControlCoreTier() {
+ public int getControlCoreTier() {
+
+ //Always return best tier if config is off.
+ boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
+ if (!aCoresConfig) {
+ return 10;
+ }
+
if (mControlCoreBus.isEmpty()) {
log("No Control Core Modules Found.");
return 0;
@@ -1499,7 +1507,10 @@ GT_MetaTileEntity_MultiBlockBase {
public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack);
- boolean aHasCore = this.getControlCoreBus() != null;
+
+ boolean aCoresConfig = gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
+
+ boolean aHasCore = (aCoresConfig ? (this.getControlCoreBus() != null) : true);
return aStructureCheck && aHasCore;
}