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/recipes | |
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/recipes')
-rw-r--r-- | src/main/java/gtPlusPlus/recipes/CokeAndPyrolyseOven.java | 3 | ||||
-rw-r--r-- | src/main/java/gtPlusPlus/recipes/RecipeRemovals.java | 29 |
2 files changed, 4 insertions, 28 deletions
diff --git a/src/main/java/gtPlusPlus/recipes/CokeAndPyrolyseOven.java b/src/main/java/gtPlusPlus/recipes/CokeAndPyrolyseOven.java index 9aabff7a99..f3c6b10cb3 100644 --- a/src/main/java/gtPlusPlus/recipes/CokeAndPyrolyseOven.java +++ b/src/main/java/gtPlusPlus/recipes/CokeAndPyrolyseOven.java @@ -7,6 +7,7 @@ import net.minecraftforge.oredict.OreDictionary; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; @@ -62,7 +63,7 @@ public class CokeAndPyrolyseOven { private static void convertPyroToCokeOven() { int aCount = 0; - for (GT_Recipe g : GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.mRecipeList) { + for (GT_Recipe g : RecipeMaps.pyrolyseRecipes.getAllRecipes()) { if (AddGregtechRecipe.importPyroRecipe(g)) { aCount++; } diff --git a/src/main/java/gtPlusPlus/recipes/RecipeRemovals.java b/src/main/java/gtPlusPlus/recipes/RecipeRemovals.java index 16d99494d3..b61400e1d5 100644 --- a/src/main/java/gtPlusPlus/recipes/RecipeRemovals.java +++ b/src/main/java/gtPlusPlus/recipes/RecipeRemovals.java @@ -6,7 +6,6 @@ import java.util.Collection; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.ArrayUtils; @@ -14,7 +13,7 @@ import advsolar.common.AdvancedSolarPanel; import gregtech.api.enums.Materials; import gregtech.api.enums.Mods; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.util.GTPP_Recipe; +import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GT_Recipe; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gtPlusPlus.api.objects.Logger; @@ -32,7 +31,6 @@ public class RecipeRemovals { public static void onLoadComplete() { removeCrudeTurbineRotors(); - removeGTRareEarthRecipe(); } // Doesn't actually remove recipes, just hide them @@ -40,7 +38,7 @@ public class RecipeRemovals { int aRemoved = 0; int CUT = CORE.turbineCutoffBase; Item aU; - Collection<GT_Recipe> aAssRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList; + Collection<GT_Recipe> aAssRecipes = RecipeMaps.assemblerRecipes.getAllRecipes(); // 170, 172, 174, 176 if (aAssRecipes.size() > 0) { for (GT_Recipe aG : aAssRecipes) { @@ -106,27 +104,4 @@ public class RecipeRemovals { Logger.INFO("Removed " + aRemoved + " useless Turbines."); } - - private static void removeGTRareEarthRecipe() { - - Logger.INFO("Processing Gregtech recipe maps, removing recipes to suit GT++."); - // Remove Rare Earth Centrifuging - // 1 Rare Earth Dust - 25% chance for small piles of: neodymium, yttrium, lanthanum, cerium, cadmium, and - // caesium - // Replaced by advanced sifting recipe. - GT_Recipe aRareEarthCentrifuging = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe( - null, - false, - 20, - new FluidStack[] {}, - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustRareEarth", 1) }); - if (aRareEarthCentrifuging != null && aRareEarthCentrifuging.mEnabled) { - aRareEarthCentrifuging.mEnabled = false; - aRareEarthCentrifuging.mHidden = true; - GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging); - GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging); - Logger.INFO("Removed vanilla GT Rare Earth processing."); - } - - } } |