From b6caaf255da083516286321155ef339b60a07393 Mon Sep 17 00:00:00 2001 From: miozune Date: Mon, 4 Dec 2023 06:26:09 +0900 Subject: Migrate to new RecipeMap (#788) * Remove reference to GTPP_Recipe itself * Remove GTPP_Recipe_Map_Internal * Move recipemaps to separated class * Remove unused recipemaps * Migrate GT++ recipemaps Remove sElementalDuplicatorRecipes in favor of GT replicatorRecipes supporting findRecipe * Migrate the rest * Adjust catalyst priorities * Add ABS non-alloy recipe category * Remove s prefixes from recipemaps * Adapt to GT_StreamUtil rename * Adjust recipe catalysts * Fix build * update gradle+bs+deps (cherry picked from commit 8b185c7a4d881d38580cc98456265ebb751b6d93) * update deps --------- Co-authored-by: Martin Robertz --- .../loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java index a812e82275..6915e193e3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java @@ -7,9 +7,8 @@ import java.util.List; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import gregtech.api.util.GTPP_Recipe; +import gregtech.api.recipe.RecipeMap; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; @@ -62,14 +61,14 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells { return GT_Utility.getFluidForFilledItem(ingot, true); } - public static synchronized int generateRecipesNotUsingCells(GT_Recipe_Map aInputs, GT_Recipe_Map aOutputs) { + public static synchronized int generateRecipesNotUsingCells(RecipeMap aInputs, RecipeMap aOutputs) { init(); int aRecipesHandled = 0; int aInvalidRecipesToConvert = 0; - int aOriginalCount = aInputs.mRecipeList.size(); + int aOriginalCount = aInputs.getAllRecipes().size(); ArrayList deDuplicationInputArray = new ArrayList<>(); - recipe: for (GT_Recipe x : aInputs.mRecipeList) { + recipe: for (GT_Recipe x : aInputs.getAllRecipes()) { if (x != null) { ItemStack[] aInputItems = x.mInputs.clone(); @@ -145,7 +144,7 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells { aInvalidRecipesToConvert++; continue; // Skip this recipe entirely if we find an item we don't like } - GT_Recipe aNewRecipe = new GTPP_Recipe( + GT_Recipe aNewRecipe = new GT_Recipe( false, aNewItemInputs, aNewItemOutputs, @@ -168,12 +167,12 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells { } // cast arraylist of input to a regular array and pass it to a duplicate recipe remover. List deDuplicationOutputArray = GT_RecipeUtils - .removeDuplicates(deDuplicationInputArray, aOutputs.mNEIName); + .removeDuplicates(deDuplicationInputArray, aOutputs.unlocalizedName); // add each recipe from the above output to the intended recipe map for (GT_Recipe recipe : deDuplicationOutputArray) { aOutputs.add(recipe); } - Logger.INFO("Generated Recipes for " + aOutputs.mNEIName); + Logger.INFO("Generated Recipes for " + aOutputs.unlocalizedName); Logger.INFO("Original Map contains " + aOriginalCount + " recipes."); Logger.INFO("Output Map contains " + aRecipesHandled + " recipes."); Logger.INFO("There were " + aInvalidRecipesToConvert + " invalid recipes."); -- cgit