aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/recipe
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-08-21 18:40:21 +0200
committerGitHub <noreply@github.com>2024-08-21 18:40:21 +0200
commit15208bb959da3d192c6dfa44a4f029544e98ddd8 (patch)
tree6273f3eb4149c7e86c3cee6a775ad2eebad85958 /src/main/java/gregtech/api/recipe
parente6687f29ada12095e896855c4b22f8e0bdb2989f (diff)
downloadGT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.tar.gz
GT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.tar.bz2
GT5-Unofficial-15208bb959da3d192c6dfa44a4f029544e98ddd8.zip
Cleaning up GT5U's post init (#2932)
* wrap MTE ids print into a debug option * remove EnsureToBeLoadedLast config * exit early * spotless apply * making collision checks optional by default --------- Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/api/recipe')
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMap.java4
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/recipe/RecipeMap.java b/src/main/java/gregtech/api/recipe/RecipeMap.java
index 8ca9748f4f..46b32d18dd 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMap.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMap.java
@@ -1,5 +1,7 @@
package gregtech.api.recipe;
+import static gregtech.api.util.GT_RecipeBuilder.ENABLE_COLLISION_CHECK;
+
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -125,7 +127,7 @@ public final class RecipeMap<B extends RecipeMapBackend> implements IRecipeMap {
aRecipe.mFakeRecipe = aFakeRecipe;
if (aRecipe.mFluidInputs.length < backend.properties.minFluidInputs
&& aRecipe.mInputs.length < backend.properties.minItemInputs) return null;
- if (aCheckForCollisions && backend.checkCollision(aRecipe)) return null;
+ if (aCheckForCollisions && ENABLE_COLLISION_CHECK && backend.checkCollision(aRecipe)) return null;
return backend.compileRecipe(aRecipe);
}
diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
index e41409fd51..8ba0895a7f 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
@@ -1,5 +1,6 @@
package gregtech.api.recipe;
+import static gregtech.api.util.GT_RecipeBuilder.ENABLE_COLLISION_CHECK;
import static gregtech.api.util.GT_RecipeBuilder.handleInvalidRecipe;
import static gregtech.api.util.GT_RecipeBuilder.handleRecipeCollision;
import static gregtech.api.util.GT_Utility.areStacksEqualOrNull;
@@ -179,7 +180,7 @@ public class RecipeMapBackend {
recipe = properties.recipeTransformer.apply(recipe);
}
if (recipe == null) continue;
- if (builder.isCheckForCollision() && checkCollision(recipe)) {
+ if (builder.isCheckForCollision() && ENABLE_COLLISION_CHECK && checkCollision(recipe)) {
handleCollision(recipe);
continue;
}