From 17fc0a90dd10db4b4313402c9bb65e75c5c55ba1 Mon Sep 17 00:00:00 2001 From: TechnicianLP <9272536+TechnicianLP@users.noreply.github.com> Date: Thu, 28 Dec 2023 10:16:26 +0100 Subject: Fix RecipeMapBackend not indexing Alternate ItemStacks (#2434) * Add handling for GT_Recipe_WithAlt in RecipeMapBackend * Revert dependencies downgrade --- src/main/java/gregtech/api/recipe/RecipeMapBackend.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/gregtech/api/recipe') 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; } -- cgit