aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-12-04 05:34:27 +0900
committerGitHub <noreply@github.com>2023-12-03 21:34:27 +0100
commitf74c7cc297d1d19d38a19683cd277ad9ce605d3a (patch)
treeb2a5d66ec5a959099240fb1db239ffc0f9531839 /src/main/java/gregtech/api
parentb08cde7de4ec93cba05fb070991ad1dffb800ce1 (diff)
downloadGT5-Unofficial-f74c7cc297d1d19d38a19683cd277ad9ce605d3a.tar.gz
GT5-Unofficial-f74c7cc297d1d19d38a19683cd277ad9ce605d3a.tar.bz2
GT5-Unofficial-f74c7cc297d1d19d38a19683cd277ad9ce605d3a.zip
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>
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java43
-rw-r--r--src/main/java/gregtech/api/enums/Element.java3
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java1
-rw-r--r--src/main/java/gregtech/api/enums/MachineType.java4
-rw-r--r--src/main/java/gregtech/api/enums/MetaTileEntityIDs.java1
-rw-r--r--src/main/java/gregtech/api/gui/modularui/GT_UITextures.java7
-rw-r--r--src/main/java/gregtech/api/interfaces/IRecipeMap.java (renamed from src/main/java/gregtech/api/interfaces/IGT_RecipeMap.java)16
-rw-r--r--src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java26
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java8
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IOverclockDescriptionProvider.java15
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IRecipeLockable.java5
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/RecipeMapWorkable.java49
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaGenerated_Item.java4
-rw-r--r--src/main/java/gregtech/api/logic/ComplexParallelProcessingLogic.java7
-rw-r--r--src/main/java/gregtech/api/logic/ProcessingLogic.java174
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Frame.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java22
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java325
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Bronze.java14
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java278
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_Steel.java8
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ExtendedPowerMultiBlockBase.java31
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Input.java10
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java17
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java107
-rw-r--r--src/main/java/gregtech/api/multitileentity/multiblock/base/Controller.java4
-rw-r--r--src/main/java/gregtech/api/objects/overclockdescriber/EUNoOverclockDescriber.java110
-rw-r--r--src/main/java/gregtech/api/objects/overclockdescriber/EUOverclockDescriber.java80
-rw-r--r--src/main/java/gregtech/api/objects/overclockdescriber/FusionOverclockDescriber.java69
-rw-r--r--src/main/java/gregtech/api/objects/overclockdescriber/OverclockDescriber.java106
-rw-r--r--src/main/java/gregtech/api/objects/overclockdescriber/SteamOverclockDescriber.java64
-rw-r--r--src/main/java/gregtech/api/recipe/BasicUIProperties.java251
-rw-r--r--src/main/java/gregtech/api/recipe/BasicUIPropertiesBuilder.java264
-rw-r--r--src/main/java/gregtech/api/recipe/FindRecipeQuery.java178
-rw-r--r--src/main/java/gregtech/api/recipe/NEIRecipeProperties.java89
-rw-r--r--src/main/java/gregtech/api/recipe/NEIRecipePropertiesBuilder.java100
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeCategories.java56
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeCategory.java81
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeCategoryHolder.java13
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeCategorySetting.java52
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMap.java395
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java461
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackendProperties.java77
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackendPropertiesBuilder.java119
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBuilder.java522
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapFrontend.java395
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMaps.java1177
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMetadataKey.java84
-rw-r--r--src/main/java/gregtech/api/recipe/check/FindRecipeResult.java125
-rw-r--r--src/main/java/gregtech/api/recipe/check/RecipeValidator.java80
-rw-r--r--src/main/java/gregtech/api/recipe/check/SingleRecipeCheck.java25
-rw-r--r--src/main/java/gregtech/api/recipe/maps/AssemblerBackend.java35
-rw-r--r--src/main/java/gregtech/api/recipe/maps/AssemblyLineFrontend.java76
-rw-r--r--src/main/java/gregtech/api/recipe/maps/DistillationTowerFrontend.java38
-rw-r--r--src/main/java/gregtech/api/recipe/maps/FluidCannerBackend.java73
-rw-r--r--src/main/java/gregtech/api/recipe/maps/FluidOnlyFrontend.java33
-rw-r--r--src/main/java/gregtech/api/recipe/maps/FormingPressBackend.java92
-rw-r--r--src/main/java/gregtech/api/recipe/maps/FuelBackend.java75
-rw-r--r--src/main/java/gregtech/api/recipe/maps/FurnaceBackend.java52
-rw-r--r--src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelBackend.java132
-rw-r--r--src/main/java/gregtech/api/recipe/maps/LargeBoilerFuelFrontend.java25
-rw-r--r--src/main/java/gregtech/api/recipe/maps/LargeNEIFrontend.java65
-rw-r--r--src/main/java/gregtech/api/recipe/maps/MicrowaveBackend.java145
-rw-r--r--src/main/java/gregtech/api/recipe/maps/NonGTBackend.java52
-rw-r--r--src/main/java/gregtech/api/recipe/maps/OilCrackerBackend.java41
-rw-r--r--src/main/java/gregtech/api/recipe/maps/PrinterBackend.java142
-rw-r--r--src/main/java/gregtech/api/recipe/maps/RecyclerBackend.java51
-rw-r--r--src/main/java/gregtech/api/recipe/maps/ReplicatorBackend.java100
-rw-r--r--src/main/java/gregtech/api/recipe/maps/SpaceProjectFrontend.java131
-rw-r--r--src/main/java/gregtech/api/recipe/maps/TranscendentPlasmaMixerFrontend.java56
-rw-r--r--src/main/java/gregtech/api/recipe/maps/UnpackagerBackend.java53
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/EmptyRecipeMetadataStorage.java50
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/IRecipeMetadataStorage.java34
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java30
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgrade.java7
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/PCBFactoryUpgradeKey.java32
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/RecipeMetadataStorage.java56
-rw-r--r--src/main/java/gregtech/api/recipe/metadata/SimpleRecipeMetadataKey.java27
-rw-r--r--src/main/java/gregtech/api/util/FieldsAreNonnullByDefault.java18
-rw-r--r--src/main/java/gregtech/api/util/GT_Config.java14
-rw-r--r--src/main/java/gregtech/api/util/GT_Forestry_Compat.java25
-rw-r--r--src/main/java/gregtech/api/util/GT_LanguageManager.java1
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java34
-rw-r--r--src/main/java/gregtech/api/util/GT_OverclockCalculator.java34
-rw-r--r--src/main/java/gregtech/api/util/GT_ParallelHelper.java66
-rw-r--r--src/main/java/gregtech/api/util/GT_ProcessingArray_Manager.java8
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java5789
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeBuilder.java257
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeConstants.java125
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeMapUtil.java28
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java113
-rw-r--r--src/main/java/gregtech/api/util/GT_StreamUtil.java44
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java27
-rw-r--r--src/main/java/gregtech/api/util/MethodsReturnNonnullByDefault.java22
-rw-r--r--src/main/java/gregtech/api/util/VoidProtectionHelper.java22
95 files changed, 7531 insertions, 6955 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java
index 6848c66a38..c5e27aebca 100644
--- a/src/main/java/gregtech/api/GregTech_API.java
+++ b/src/main/java/gregtech/api/GregTech_API.java
@@ -36,6 +36,7 @@ import net.minecraft.world.World;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;
+import com.google.common.collect.SetMultimap;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
@@ -107,6 +108,7 @@ public class GregTech_API {
* Fixes the HashMap Mappings for ItemStacks once the Server started
*/
public static final Collection<Map<? extends GT_ItemStack, ?>> sItemStackMappings = new ArrayList<>();
+ public static final Collection<SetMultimap<? extends GT_ItemStack, ?>> itemStackMultiMaps = new ArrayList<>();
/**
* The MetaTileEntity-ID-List-Length
@@ -121,17 +123,36 @@ public class GregTech_API {
/**
* A List of all registered MetaTileEntities
* <p/>
- * 0 - 749 are used by GregTech. 750 - 999 are reserved for Alkalus. 1000 - 2047 are used by GregTech. 2048 - 2559
- * are reserved for OvermindDL. 2560 - 3071 are reserved for Immibis. 3072 - 3583 are reserved for LinusPhoenix.
- * 3584 - 4095 are reserved for BloodyAsp. 4096 - 5095 are used for GregTech Frames. 5096 - 6099 are used for
- * GregTech Pipes. 6100 - 8191 are used for GregTech Decoration Blocks. 8192 - 8703 are reserved for ZL123. 8704 -
- * 9215 are reserved for Mr10Movie. 9216 - 9727 are used for GregTech Automation Machines. 9728 - 10239 are reserved
- * for 28Smiles. 10240 - 10751 are reserved for VirMan. 10752 - 11263 are reserved for Briareos81. 11264 - 12000 are
- * reserved for Quantum64. 12001 - 12500 are reserved for RedMage17. 12501 - 13000 are reserved for bartimaeusnek.
- * 13001 - 13100 are reserved for Techlone 13101 - 13500 are reserved for kekzdealer 13501 - 14000 are reserved for
- * glee8e. 14001 - 14100 are reserved for glowredman 14101 - 14200 are reserved for MuXiu1997. 14201 - 14300 are
- * reserved for kuba6000. 14301 - 14999 are currently free. 15000 - 16999 are reserved for TecTech. 17000 - 29999
- * are currently free. 30000 - 31999 are reserved for Alkalus. 32001 - 32766 are reserved for Glod.
+ * 0 - 749 are used by GregTech.
+ * 750 - 999 are reserved for Alkalus.
+ * 1000 - 2047 are used by GregTech.
+ * 2048 - 2559 are reserved for OvermindDL.
+ * 2560 - 3071 are reserved for Immibis.
+ * 3072 - 3583 are reserved for LinusPhoenix.
+ * 3584 - 4095 are reserved for BloodyAsp.
+ * 4096 - 5095 are used for GregTech Frames.
+ * 5096 - 6099 are used for GregTech Pipes.
+ * 6100 - 8191 are used for GregTech Decoration Blocks.
+ * 8192 - 8703 are reserved for ZL123.
+ * 8704 - 9215 are reserved for Mr10Movie.
+ * 9216 - 9727 are used for GregTech Automation Machines.
+ * 9728 - 10239 are reserved for 28Smiles.
+ * 10240 - 10751 are reserved for VirMan.
+ * 10752 - 11263 are reserved for Briareos81.
+ * 11264 - 12000 are reserved for Quantum64.
+ * 12001 - 12500 are reserved for RedMage17.
+ * 12501 - 13000 are reserved for bartimaeusnek.
+ * 13001 - 13100 are reserved for Techlone.
+ * 13101 - 13500 are reserved for kekzdealer.
+ * 13501 - 14000 are reserved for glee8e.
+ * 14001 - 14100 are reserved for glowredman.
+ * 14101 - 14200 are reserved for MuXiu1997.
+ * 14201 - 14300 are reserved for kuba6000.
+ * 14301 - 14999 are currently free.
+ * 15000 - 16999 are reserved for TecTech.
+ * 17000 - 29999 are currently free.
+ * 30000 - 31999 are reserved for Alkalus.