aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--dependencies.gradle8
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java9
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java2
3 files changed, 14 insertions, 5 deletions
diff --git a/dependencies.gradle b/dependencies.gradle
index e80a08e633..ff036b1ccc 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -40,14 +40,14 @@ dependencies {
api("com.github.GTNewHorizons:GTNHLib:0.0.13:dev")
api("com.github.GTNewHorizons:ModularUI:1.1.24:dev")
api("com.github.GTNewHorizons:waila:1.6.5:dev")
- api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-304-GTNH:dev")
- api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.4-gtnh:dev")
+ api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-305-GTNH:dev")
+ api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.5-gtnh:dev")
implementation("com.github.GTNewHorizons:Avaritia:1.46:dev")
compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.2.12:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.38:dev") { transitive = false }
- compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.6.0:dev") { transitive = false }
+ compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.6.1:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.8.0:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.9.0-GTNH:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.15.3:dev") { transitive = false }
@@ -60,7 +60,7 @@ dependencies {
compileOnly("curse.maven:cofh-core-69162:2388751") { transitive = false }
compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.0:dev") { transitive = false }
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false }
- compileOnly("com.github.GTNewHorizons:Hodgepodge:2.4.2:dev") { transitive = false }
+ compileOnly("com.github.GTNewHorizons:Hodgepodge:2.4.3:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Botania:1.10.3-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:HoloInventory:2.3.2-GTNH:dev') { transitive = false }
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') { transitive = false }
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}.