aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
authorTechnicianLP <9272536+TechnicianLP@users.noreply.github.com>2023-12-28 10:16:26 +0100
committerGitHub <noreply@github.com>2023-12-28 10:16:26 +0100
commit17fc0a90dd10db4b4313402c9bb65e75c5c55ba1 (patch)
tree3887add87abd061e24eeb9a9b64648859d629998 /src/main/java/gregtech
parentf7e37c4bfcae81a7b76332c4091af3b2865d1089 (diff)
downloadGT5-Unofficial-17fc0a90dd10db4b4313402c9bb65e75c5c55ba1.tar.gz
GT5-Unofficial-17fc0a90dd10db4b4313402c9bb65e75c5c55ba1.tar.bz2
GT5-Unofficial-17fc0a90dd10db4b4313402c9bb65e75c5c55ba1.zip
Fix RecipeMapBackend not indexing Alternate ItemStacks (#2434)
* Add handling for GT_Recipe_WithAlt in RecipeMapBackend * Revert dependencies downgrade
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java9
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
index a20a99d3c3..cbc2e8b73f 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
@@ -152,6 +152,15 @@ public class RecipeMapBackend {
if (item == null) continue;
itemIndex.put(new GT_ItemStack(item), recipe);
}
+ if (recipe instanceof GT_Recipe.GT_Recipe_WithAlt recipeWithAlt) {
+ for (ItemStack[] itemStacks : recipeWithAlt.mOreDictAlt) {
+ if (itemStacks == null) continue;
+ for (ItemStack item : itemStacks) {
+ if (item == null) continue;
+ itemIndex.put(new GT_ItemStack(item), recipe);
+ }
+ }
+ }
return recipe;
}
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index a444a16ef2..57f619eb7e 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -912,7 +912,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public static class GT_Recipe_WithAlt extends GT_Recipe {
- ItemStack[][] mOreDictAlt;
+ public ItemStack[][] mOreDictAlt;
/**
* Only for {@link GT_RecipeBuilder}.