aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util
diff options
context:
space:
mode:
authorHoleFish <48403212+HoleFish@users.noreply.github.com>2024-08-15 02:58:06 +0800
committerGitHub <noreply@github.com>2024-08-14 20:58:06 +0200
commita27c6786958249f6ed54693599900d6ecfb9edaf (patch)
treee8d33f93883f6efe8c4c974e12548123f650cc08 /src/main/java/gregtech/api/util
parenta8536e01d56387a30785c5309e81acaf728ed364 (diff)
downloadGT5-Unofficial-a27c6786958249f6ed54693599900d6ecfb9edaf.tar.gz
GT5-Unofficial-a27c6786958249f6ed54693599900d6ecfb9edaf.tar.bz2
GT5-Unofficial-a27c6786958249f6ed54693599900d6ecfb9edaf.zip
Remove fixEnergyRequirements (#2890)
* Remove fixEnergyRequirements * update * fix * spotless
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeBuilder.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java
index 66bc11444a..27af090883 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeBuilder.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeBuilder.java
@@ -23,6 +23,7 @@ import net.minecraftforge.fluids.FluidStack;
import org.jetbrains.annotations.Contract;
import gregtech.GT_Mod;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Mods;
import gregtech.api.interfaces.IRecipeMap;
import gregtech.api.recipe.RecipeCategory;
@@ -38,6 +39,7 @@ public class GT_RecipeBuilder {
private static final boolean DEBUG_MODE_NULL;
private static boolean PANIC_MODE_NULL;
private static final boolean DEBUG_MODE_INVALID;
+ private static final boolean DEBUG_MODE_FULL_ENERGY;
private static final boolean PANIC_MODE_INVALID;
private static final boolean DEBUG_MODE_COLLISION;
private static final boolean PANIC_MODE_COLLISION;
@@ -70,6 +72,7 @@ public class GT_RecipeBuilder {
DEBUG_MODE_NULL = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.null");
DEBUG_MODE_INVALID = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.invalid");
DEBUG_MODE_COLLISION = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.collision");
+ DEBUG_MODE_FULL_ENERGY = debugAll || Boolean.getBoolean("gt.recipebuilder.debug.fullenergy");
final boolean panicAll = Boolean.getBoolean("gt.recipebuilder.panic");
PANIC_MODE_NULL = panicAll || Boolean.getBoolean("gt.recipebuilder.panic.null");
@@ -345,13 +348,26 @@ public class GT_RecipeBuilder {
}
public GT_RecipeBuilder eut(int eut) {
+ if (DEBUG_MODE_FULL_ENERGY) {
+ // Ignores ULV voltage
+ for (int i = 1; i < GT_Values.VP.length; i++) {
+ if (eut <= GT_Values.V[i]) {
+ if (eut > GT_Values.VP[i]) {
+ GT_Log.err.println(
+ "EUt > Practical Voltage detected. EUt: " + eut
+ + ", Practical Voltage: "
+ + GT_Values.VP[i]);
+ new IllegalArgumentException().printStackTrace(GT_Log.err);
+ }
+ } else break;
+ }
+ }
this.eut = eut;
return this;
}
public GT_RecipeBuilder eut(long eut) {
- this.eut = (int) eut;
- return this;
+ return eut((int) eut);
}
/**