Skip to content

Reworked recipe group color to not be stored on recipe instance - #5298

Open
Archengius wants to merge 1 commit into
GregTechCEu:1.20.1from
Archengius:feat-consistent-recipe-group-coloring
Open

Reworked recipe group color to not be stored on recipe instance#5298
Archengius wants to merge 1 commit into
GregTechCEu:1.20.1from
Archengius:feat-consistent-recipe-group-coloring

Conversation

@Archengius

Copy link
Copy Markdown

What

Reworked recipe group color to not be stored on recipe instance. This makes recipe group coloring consistent across all possible recipe execution paths across all machines (e.g. distillation tower, research station, and other special cases of recipe matching) and all entry points to setupRecipe (some machines have custom logic there that may run with the original, uncopied recipe).

Implementation Details

ActionResult returned from recipe runner now stores assignedGroupColor value assigned by the recipe runner if no predefined group color was specified in the recipe handler call. Recipe handling family of functions now explicitly accepts recipe group color rather than implicitly reading it from recipe object. Running recipe group color is now stored on the recipe logic and not implicitly in the copied recipe. setupRecipe now explicitly takes recipe group color alongside the recipe, rather than expecting it to be set on the recipe. Consistency edits across the codebase to make sure all machines correctly handle recipe group coloring (most notably distillation tower).

AI Usage

  • No AI driven tools were used for this pull request.
  • Yes AI driven tools were used for this pull request.

Claude Sonnet 5 was used to review the code. All of the code is hand-written.

Outcome

All machines and recipe logic implementations now correctly handle recipe group coloring under all circumstances and entry points to setupRecipe. group coloring information is always consistent after being assigned first during recipe matching.

How Was This Tested

Tested a few multiblocks without colored buses and with colored buses and made sure the coloring logic works as expected.

Potential Compatibility Issues

API did change, most notably RecipeHelper family of functions, RecipeLogic overridable functions, and ActionResult SUCCESS and PASS constants were replaced with factory methods.

@Archengius
Archengius requested a review from a team as a code owner August 16, 2026 12:31
@gustovafing gustovafing added the Do Not Merge DO NOT MERGE THIS PR YET! label Aug 16, 2026
@gustovafing

Copy link
Copy Markdown
Member

Holding off on this as this will probably be done in 9.0 when we plan to do a general refactor of recipe stuff, including splitting recipe run data out of GTRecipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Do Not Merge DO NOT MERGE THIS PR YET!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants