Skip to content

Fix Recipe failure reason and add score system - #4942

Merged
jurrejelle merged 17 commits into
1.20.1from
jj/recipe-failure-reason
Jul 26, 2026
Merged

Fix Recipe failure reason and add score system#4942
jurrejelle merged 17 commits into
1.20.1from
jj/recipe-failure-reason

Conversation

@jurrejelle

Copy link
Copy Markdown
Contributor

What

  • Add recipe failure reasons
  • Keep track of score when checking failure and only report the most matched recipe

Implementation Details

UI is kinda ugly since we only have the resloc for a gtrecipe, no name. will need to be fixed when this gets merged into MUI

AI Usage

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

Agent Used

Claude Opus 4.8 High

Agent Usage Description

Used it to spitball the mechanics, write a decent bit of the code, write a decent bit of the tests. Everything was reviewed and checked by me, both in code and in game.

How Was This Tested

Tests and
java_y4vnQYPj7F
java_2QEspUE99a
java_7oCvF16Xa4

Potential Compatibility Issues

Since there should be no changes in parts that addons touch, I don't think this needs documentation?

@jurrejelle
jurrejelle requested a review from a team as a code owner June 18, 2026 15:06
@jurrejelle jurrejelle added type: refactor Suggestion to refactor a section of code 1.20.1 Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. labels Jun 18, 2026
@jurrejelle jurrejelle changed the title Add Recipe failure reasons and score Fix Recipe failure reason and add score system Jun 18, 2026
@screret

screret commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

IMO the raw recipe id should never be visible to end users, it's bad UX

@github-actions github-actions Bot added the Tests: Failed Game Tests have failed on this PR label Jun 18, 2026
@jurrejelle

Copy link
Copy Markdown
Contributor Author

IMO the raw recipe id should never be visible to end users, it's bad UX

I agree, but we don't have a better name in GTRecipe do we? I'm considering in the MUI branch to take the ID and making it Title Case and showing that but idk, will have to UX yappa on it

@screret screret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the bestFailure* fields' names don't sit right with me. Could you think of something that better describes what they actually store?

Comment thread src/main/java/com/gregtechceu/gtceu/api/recipe/RecipeRunner.java
@screret

screret commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

I agree, but we don't have a better name in GTRecipe do we? I'm considering in the MUI branch to take the ID and making it Title Case and showing that but idk, will have to UX yappa on it

No ID should be shown at all, as there isn't a good way to make a human-readable name for recipes.

@github-actions github-actions Bot added Tests: Passed Game Tests have passed on this PR and removed Tests: Failed Game Tests have failed on this PR labels Jun 18, 2026
@jurrejelle

Copy link
Copy Markdown
Contributor Author

I agree, but we don't have a better name in GTRecipe do we? I'm considering in the MUI branch to take the ID and making it Title Case and showing that but idk, will have to UX yappa on it

No ID should be shown at all, as there isn't a good way to make a human-readable name for recipes.

I disagree because the value for a debugging end-user to see which recipe is being ran outweighs the ugliness imo but we'll have a discussion about it with ghosti for UX and they can decide

@github-actions github-actions Bot added Tests: Failed Game Tests have failed on this PR and removed Tests: Passed Game Tests have passed on this PR labels Jul 26, 2026
@github-actions github-actions Bot added Tests: Passed Game Tests have passed on this PR and removed Tests: Failed Game Tests have failed on this PR labels Jul 26, 2026
@jurrejelle
jurrejelle merged commit 24ee91a into 1.20.1 Jul 26, 2026
4 of 5 checks passed
@jurrejelle
jurrejelle deleted the jj/recipe-failure-reason branch July 26, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. Tests: Passed Game Tests have passed on this PR type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants