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

Distinct Fluid Behaviour and Recipe Runner Refactor #2544

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

Conversation

YoungOnionMC
Copy link
Member

What

Refactored how the recipe runner class handled searching and consuming contents of a recipe based on the current handler trying to process that recipe, in short distinct fluid hatches are now possible.

Implementation Details

Refactors out the recipe handling related functions out of GTRecipe and into their own class RecipeHandler, switched the capability proxy table into a double nested map for better clarity. Unified RecipeRunner to handle the entire map of recipe contents at once instead of on a per capability basis. Got rid of references to the unused slot naming system in recipe searching and handling. Adds Recipe ActionResults to various method for logging how a recipe search or handle method failed

Outcome

TBD

@YoungOnionMC YoungOnionMC added the Do Not Merge DO NOT MERGE THIS PR YET! label Dec 16, 2024
YoungOnionMC and others added 15 commits December 22, 2024 03:06
… into yo/distinctness

# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/api/item/tool/ToolHelper.java
#	src/main/java/com/gregtechceu/gtceu/api/machine/feature/IRecipeLogicMachine.java
#	src/main/java/com/gregtechceu/gtceu/api/machine/steam/SimpleSteamMachine.java
#	src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java
#	src/main/java/com/gregtechceu/gtceu/api/recipe/GTRecipe.java
#	src/main/java/com/gregtechceu/gtceu/api/recipe/RecipeHelper.java
#	src/main/java/com/gregtechceu/gtceu/api/recipe/content/Content.java
#	src/main/java/com/gregtechceu/gtceu/api/recipe/modifier/RecipeModifierList.java
#	src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeModifiers.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/DistillationTowerMachine.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeCombustionEngineMachine.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/steam/SteamParallelMultiblockMachine.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/trait/BedrockOreMinerLogic.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/trait/FluidDrillLogic.java
#	src/main/java/com/gregtechceu/gtceu/common/machine/trait/NotifiableStressTrait.java
#	src/main/java/com/gregtechceu/gtceu/test/GTGameTests.java
@krossgg krossgg added type: refactor Suggestion to refactor a section of code Merge on Major Release Breaking changes, must be bundled into an 1.X.0 Update and removed Do Not Merge DO NOT MERGE THIS PR YET! labels Feb 11, 2025
@krossgg krossgg marked this pull request as ready for review February 11, 2025 17:28
@krossgg krossgg requested a review from a team as a code owner February 11, 2025 17:28
Copy link
Contributor

@krossgg krossgg left a comment

Choose a reason for hiding this comment

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

Comments for myself

return recipe;
}

GTRecipe current = recipe.copy();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this copy is unnecessary? Check if the GTRecipeBuilder call does a shallow copy.

YoungOnionMC and others added 4 commits March 5, 2025 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge on Major Release Breaking changes, must be bundled into an 1.X.0 Update type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants