From f74c7cc297d1d19d38a19683cd277ad9ce605d3a Mon Sep 17 00:00:00 2001 From: miozune Date: Mon, 4 Dec 2023 05:34:27 +0900 Subject: Refactor RecipeMap (#2345) * Remove deprecated and unused things * Move recipemap subclasses * Move GT_Recipe_Map to outside and rename to RecipeMap * Move recipemap instances to separated class & remove prepending s * Remove useless GT_Recipe constructors * Always use ModularUI * Rename IGT_RecipeMap -> IRecipeMap * Add RecipeMapBuilder * Remove more deprecated and unused things * Fix RecipeMap type parameters * Use multimap for recipe index * Fix bending recipe error in dev env * Remove mUniqueIdentifier * Update AE2FC * Less edgy texture for NEI recipe background * Add replicator fluid output slot for NEI and machine GUI * Fix fluid fuels not having fuel value in large boilers * Remove GT_RectHandler and NEI_TransferRectHost * Remove RecipeMapHandler * Move NEI energy description from RecipeMapFrontend to Power * Refactor the way to filter fusion recipes * Check restriction for some properties * Remove showVoltageAmperage * Make Power accept GT_Recipe * Fix NPE * Move NEI duration description to Power from Frontend * Directly implement IRecipeProcessingAwareHatch for GT_MetaTileEntity_Hatch_InputBus_ME * Make Power integrated with GT_OverclockCalculator * Rename Power -> OverclockDescriber * Don't modify recipe find logic until postload finishes * Reformat reserved MTE ids * Fix check for too few inputs on recipe addition * Move replicator logic to backend * Stop un-hiding assline recipes * Allow setting custom recipe comparator & implement for fusion * Update AE2FC * Rename getRecipeList and getRecipes -> getRecipeMap * Automatically register recipe catalysts * Cleanup the way to detect recipe collision * Make use of BasicUIProperties for basic machines * Make use of BasicUIProperties for UIHelper * Rename specialHandler -> recipeTransformer * Add way to automatically register handler info * Add recipe category * Add some APIs for addons * Rename blastRecipes -> blastFurnaceRecipes * Remove GT_MetaTileEntity_BasicMachine_GT_Recipe#mSharedTank and #mRequiresFluidForFiltering * Don't require setting duration and EU/t for fuel recipes * Don't require setting EU/t for primitive blast furnace recipes * Revert change to addMultiblockChemicalRecipe * Fix large boiler general desc recipe not being added * Hide duration and EU/t from large boiler * Cleanup recipe stacktrace draw * Extend metadata usage of recipe builder to recipe itself * Implement metadata handling & NEI comparator for PCB factory * Some rename around NEIRecipeInfo * Some toString implementations * Add more APIs for addons & some rename * Infer handler icon from recipe catalyst if one is not set * Also shrink recipe title when OC is not used * Remove rare earth centrifuge recipe * Use metadata for replicator backend * Adjust geothermal generator output slot * Allow having multiple transferrects * Store recipemap reference in backend * Rename vacuumRecipes -> vacuumFreezerRecipes * Add config to tweak visibility of recipe categories * Remove mHideRecyclingRecipes in favor of recipe category config * Fix typo fluidSolidfierRecipes -> fluidSolidifierRecipes * Refactor findRecipe and ProcessingLogic to use Stream * Fix BBF handler icon & remove bronze blast furnace * Add fluent API for findRecipe * Add way to stop adding progressbar * Change arg order for special texture * Avoid overwriting interesting failure with NO_RECIPE * Some changes for FuelBackend * Set space project icon * Remove localization from TT * Remove CNC recipe adder * Move recipe extractor from AE2FC * Minor internal change for ProcessingLogic#applyRecipe * More javadoc on #getAvailableRecipeMaps * Better implementation of #ofSupplier * Move replicator exponent config to GT_Proxy * Remove RC & IC2 macerator handling * Rename StreamUtil -> GT_StreamUtil * Refactor code around RecipeMetadataStorage * Revise #compileRecipe javadoc * Switch extreme diesel recipe loader to downstream recipe map * Optimize #reMap * Rename reload -> reloadNEICache * Minor tweak for drawEnergyInfo * a bit more doc * Adjust recipe catalysts * Add toString implementation for GT_Fluid for debug * Minor revision for OilCrackerBackend * Index replicator recipes by material --------- Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> --- .../loaders/oreprocessing/ProcessingPlank.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java') diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index 7e28e64674..b28b997a93 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -1,8 +1,8 @@ package gregtech.loaders.oreprocessing; -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCutterRecipes; -import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sLatheRecipes; +import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; +import static gregtech.api.recipe.RecipeMaps.cutterRecipes; +import static gregtech.api.recipe.RecipeMaps.latheRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeBuilder.TICKS; @@ -33,7 +33,7 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .itemOutputs(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L)) .duration(10 * TICKS) .eut(8) - .addTo(sLatheRecipes); + .addTo(latheRecipes); GT_Values.RA.stdBuilder() .itemInputs( GT_Utility.copyAmount(1, aStack), @@ -41,7 +41,7 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .itemOutputs(ItemList.Crate_Empty.get(1L)) .duration(10 * SECONDS) .eut(1) - .addTo(sAssemblerRecipes); + .addTo(assemblerRecipes); GT_Values.RA.stdBuilder() .itemInputs( GT_Utility.copyAmount(1, aStack), @@ -49,7 +49,7 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .itemOutputs(ItemList.Crate_Empty.get(1L)) .duration(10 * SECONDS) .eut(1) - .addTo(sAssemblerRecipes); + .addTo(assemblerRecipes); GT_Values.RA.stdBuilder() .itemInputs( GT_Utility.copyAmount(1, aStack), @@ -57,19 +57,19 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .itemOutputs(ItemList.Crate_Empty.get(1L)) .duration(10 * SECONDS) .eut(1) - .addTo(sAssemblerRecipes); + .addTo(assemblerRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(8, aStack), GT_Utility.getIntegratedCircuit(8)) .itemOutputs(new ItemStack(Blocks.chest, 1)) .duration(40 * SECONDS) .eut(4) - .addTo(sAssemblerRecipes); + .addTo(assemblerRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(6, aStack), new ItemStack(Items.book, 3)) .itemOutputs(new ItemStack(Blocks.bookshelf, 1)) .duration(20 * SECONDS) .eut(4) - .addTo(sAssemblerRecipes); + .addTo(assemblerRecipes); if (aStack.getItemDamage() == 32767) { for (byte i = 0; i < 64; i = (byte) (i + 1)) { @@ -83,21 +83,21 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .fluidInputs(Materials.Water.getFluid(4)) .duration(2 * 25 * TICKS) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(1, tStack)) .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) .fluidInputs(GT_ModHandler.getDistilledWater(3)) .duration(2 * 25 * TICKS) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(1, tStack)) .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) .fluidInputs(Materials.Lubricant.getFluid(1)) .duration(25 * TICKS) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_ModHandler.removeRecipeDelayed(tStack, tStack, tStack); GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), @@ -117,21 +117,21 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist .fluidInputs(Materials.Water.getFluid(4)) .duration(2 * 25) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(1, aStack)) .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) .fluidInputs(GT_ModHandler.getDistilledWater(3)) .duration(2 * 25) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_Values.RA.stdBuilder() .itemInputs(GT_Utility.copyAmount(1, aStack)) .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) .fluidInputs(Materials.Lubricant.getFluid(1)) .duration(25) .eut(4) - .addTo(sCutterRecipes); + .addTo(cutterRecipes); GT_ModHandler.removeRecipeDelayed(aStack, aStack, aStack); GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), -- cgit