Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item Material Information Refactor #2591

Open
wants to merge 26 commits into
base: 1.20.1
Choose a base branch
from

Conversation

YoungOnionMC
Copy link
Member

@YoungOnionMC YoungOnionMC commented Dec 19, 2024

What

Overhauls and breaks apart the various methods of ChemicalHelper into material related functions and the new ItemMaterialInfo methods, also renames UnificationEntry to the more suitable MaterialEntry.
Removes most of MaterialInfoLoader in favor of the more procedural method of generating item material stacks as mentioned in GTRecipeBuilder

Additional Information

GTRecipeBuilders now temporarily store all MaterialStack information for use in item decomposition information for recycling recipes if desired
Item decomposition material information also no longer depends on recipe order for material computation (ex needing to register iron plate decomp before iron furnace decomp)
GTRecipeBuilder allows for fluid inputs using a Material and amount instead of just the FluidStack if desired

Potential Incompatibilities

KubeJS recipes should be fine out of the box, just need to use the addMaterialInfo helper method if they want added decomp

YoungOnionMC and others added 14 commits December 18, 2024 16:38
# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/api/data/chemical/ChemicalHelper.java
#	src/main/java/com/gregtechceu/gtceu/api/recipe/ToolHeadReplaceRecipe.java
#	src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java
#	src/main/java/com/gregtechceu/gtceu/common/data/GTItems.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/configurable/RecipeAddition.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/misc/GCYMRecipes.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityLoader.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/misc/WoodMachineRecipes.java
#	src/main/java/com/gregtechceu/gtceu/integration/kjs/GregTechKubeJSPlugin.java
…o yo/material-decomp-refactor

# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/data/recipe/builder/GTRecipeBuilder.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/misc/ComputerRecipes.java
#	src/main/java/com/gregtechceu/gtceu/data/recipe/misc/MetaTileEntityMachineRecipeLoader.java
@YoungOnionMC YoungOnionMC marked this pull request as ready for review December 22, 2024 10:41
@YoungOnionMC YoungOnionMC requested a review from a team as a code owner December 22, 2024 10:41
@@ -281,6 +284,20 @@ public static void registerCommand(RegisterCommandsEvent event) {

@SubscribeEvent
public static void registerReloadListeners(AddReloadListenerEvent event) {
// moved here so that we can get tag info for decomp recipes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my comment is just false lmo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this back to where it was originally.

@YoungOnionMC YoungOnionMC added Do Not Merge DO NOT MERGE THIS PR YET! type: refactor Suggestion to refactor a section of code labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge DO NOT MERGE THIS PR YET! type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants