aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/recipe
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/api/recipe
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/api/recipe')
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java9
1 files changed, 9 insertions, 0 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;
}