diff options
author | miozune <miozune@gmail.com> | 2023-12-04 06:26:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 22:26:09 +0100 |
commit | b6caaf255da083516286321155ef339b60a07393 (patch) | |
tree | 89416c1d29e63de37cb43295a81913de3c24e015 /src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java | |
parent | 4ff3ef790f4e22cc80986258f13f8a8643fda0dc (diff) | |
download | GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.tar.gz GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.tar.bz2 GT5-Unofficial-b6caaf255da083516286321155ef339b60a07393.zip |
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 <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java | 15 |
1 files changed, 7 insertions, 8 deletions
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<GT_Recipe> 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<GT_Recipe> 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."); |