aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle8
-rw-r--r--src/main/java/gregtech/api/recipe/check/CheckRecipeResultRegistry.java11
-rw-r--r--src/main/java/gregtech/api/util/GT_ParallelHelper.java11
-rw-r--r--src/main/java/gregtech/api/util/VoidProtectionHelper.java35
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java2
-rw-r--r--src/main/resources/assets/gregtech/lang/en_US.lang3
7 files changed, 64 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle
index 8507c7dfbd..50c3291c86 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,4 +1,4 @@
-//version: 1701530445
+//version: 1702141377
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -54,7 +54,7 @@ plugins {
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
- id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
+ id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -613,7 +613,7 @@ repositories {
}
maven {
name = "ic2"
- url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
+ url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/")
content {
includeGroup "net.industrial-craft"
}
@@ -672,6 +672,8 @@ configurations.all {
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
+
+ substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
}
}
diff --git a/src/main/java/gregtech/api/recipe/check/CheckRecipeResultRegistry.java b/src/main/java/gregtech/api/recipe/check/CheckRecipeResultRegistry.java
index f162c892ee..4dc0b80b93 100644
--- a/src/main/java/gregtech/api/recipe/check/CheckRecipeResultRegistry.java
+++ b/src/main/java/gregtech/api/recipe/check/CheckRecipeResultRegistry.java
@@ -49,10 +49,19 @@ public final class CheckRecipeResultRegistry {
*/
public static final CheckRecipeResult NO_RECIPE = SimpleCheckRecipeResult.ofFailure("no_recipe");
/**
- * Cannot process recipe because output is full.
+ * @deprecated Use either of {@link #ITEM_OUTPUT_FULL} or {@link #FLUID_OUTPUT_FULL}.
*/
+ @Deprecated
public static final CheckRecipeResult OUTPUT_FULL = SimpleCheckRecipeResult.ofFailure("output_full");
/**
+ * Cannot process recipe because item output is full.
+ */
+ public static final CheckRecipeResult ITEM_OUTPUT_FULL = SimpleCheckRecipeResult.ofFailure("item_output_full");
+ /**
+ * Cannot process recipe because fluid output is full.
+ */
+ public static final CheckRecipeResult FLUID_OUTPUT_FULL = SimpleCheckRecipeResult.ofFailure("fluid_output_full");
+ /**
* Default unknown state.
*/
public static final CheckRecipeResult NONE = SimpleCheckRecipeResult.ofFailure("none");
diff --git a/src/main/java/gregtech/api/util/GT_ParallelHelper.java b/src/main/java/gregtech/api/util/GT_ParallelHelper.java
index 0f0dc4549f..e836122f37 100644
--- a/src/main/java/gregtech/api/util/GT_ParallelHelper.java
+++ b/src/main/java/gregtech/api/util/GT_ParallelHelper.java
@@ -341,6 +341,9 @@ public class GT_ParallelHelper {
* Called by build(). Determines the parallels and everything else that needs to be done at build time
*/
protected void determineParallel() {
+ if (maxParallel <= 0) {
+ return;
+ }
if (itemInputs == null) {
itemInputs = new ItemStack[0];
}
@@ -412,8 +415,12 @@ public class GT_ParallelHelper {
.setMaxParallel(maxParallel)
.build();
maxParallel = Math.min(voidProtectionHelper.getMaxParallel(), maxParallel);
- if (maxParallel <= 0) {
- result = CheckRecipeResultRegistry.OUTPUT_FULL;
+ if (voidProtectionHelper.isItemFull()) {
+ result = CheckRecipeResultRegistry.ITEM_OUTPUT_FULL;
+ return;
+ }
+ if (voidProtectionHelper.isFluidFull()) {
+ result = CheckRecipeResultRegistry.FLUID_OUTPUT_FULL;
return;
}
}
diff --git a/src/main/java/gregtech/api/util/VoidProtectionHelper.java b/src/main/java/gregtech/api/util/VoidProtectionHelper.java
index 440d8e63ef..3a41bba934 100644
--- a/src/main/java/gregtech/api/util/VoidProtectionHelper.java
+++ b/src/main/java/gregtech/api/util/VoidProtectionHelper.java
@@ -36,6 +36,14 @@ public class VoidProtectionHelper {
*/
private int maxParallel = 1;
/**
+ * If item output is full.
+ */
+ private boolean isItemFull;
+ /**
+ * If fluid output is full.
+ */
+ private boolean isFluidFull;
+ /**
* The item outputs to check
*/
private ItemStack[] itemOutputs;
@@ -111,6 +119,26 @@ public class VoidProtectionHelper {
}
/**
+ * @return If the calculation resulted in item output being full.
+ */
+ public boolean isItemFull() {
+ if (!built) {
+ throw new IllegalStateException("Tried to get isItemFull before building");
+ }
+ return isItemFull;
+ }
+
+ /**
+ * @return If the calculation resulted in fluid output being full.
+ */
+ public boolean isFluidFull() {
+ if (!built) {
+ throw new IllegalStateException("Tried to get isFluidFull before building");
+ }
+ return isFluidFull;
+ }
+
+ /**
* Called by {@link #build()}. Determines the parallels and everything else that needs to be done at build time
*/
private void determineParallel() {
@@ -125,9 +153,16 @@ public class VoidProtectionHelper {
// to allow more involved setting for void protections (see ComplexParallelProcessingLogic)
if (protectExcessItem && itemOutputs.length > 0 && !machine.canDumpItemToME()) {
maxParallel = Math.min(calculateMaxItemParallels(), maxParallel);
+ if (maxParallel <= 0) {
+ isItemFull = true;
+ return;
+ }
}
if (protectExcessFluid && fluidOutputs.length > 0 && !machine.canDumpFluidToME()) {
maxParallel = Math.min(calculateMaxFluidParallels(), maxParallel);
+ if (maxParallel <= 0) {
+ isFluidFull = true;
+ }
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
index d1d56f0254..254f5bf0b0 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
@@ -217,7 +217,7 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (pumpResult.getType() != ValidationType.VALID) {
mEUt = 0;
mMaxProgresstime = 0;
- setRuntimeFailureReason(CheckRecipeResultRegistry.OUTPUT_FULL);
+ setRuntimeFailureReason(CheckRecipeResultRegistry.FLUID_OUTPUT_FULL);
return false;
}
FluidStack tFluid = pumpResult.getResult();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
index 3b6c868977..e719f8db0f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
@@ -248,7 +248,7 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
}
ItemStack[] toOutput = getOutputByDrops(oreBlockDrops);
if (simulate && !canOutputAll(toOutput)) {
- setRuntimeFailureReason(CheckRecipeResultRegistry.OUTPUT_FULL);
+ setRuntimeFailureReason(CheckRecipeResultRegistry.ITEM_OUTPUT_FULL);
return false;
}
mOutputItems = toOutput;
diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang
index f76c25ef71..0b8a0ac734 100644
--- a/src/main/resources/assets/gregtech/lang/en_US.lang
+++ b/src/main/resources/assets/gregtech/lang/en_US.lang
@@ -420,7 +420,10 @@ GT5U.gui.button.drill_retract_pipes_active=§4Cannot interrupt abort procedure
GT5U.gui.text.success=§aProcessing recipe
GT5U.gui.text.generating=§aGenerating power
GT5U.gui.text.no_recipe=§7No valid recipe found
+#deprecated
GT5U.gui.text.output_full=§7Not enough output space
+GT5U.gui.text.item_output_full=§7Not enough item output space
+GT5U.gui.text.fluid_output_full=§7Not enough fluid output space
GT5U.gui.text.none=
GT5U.gui.text.crash=§4Machine turned off due to crash
GT5U.gui.text.no_fuel=§7No valid fuel found