Skip to content

Chemistry Set: match recipe ingredients by count - #148

Open
Eldrinn-Elantey wants to merge 1 commit into
masterfrom
fix/chemistry-set-recipe-matching
Open

Chemistry Set: match recipe ingredients by count#148
Eldrinn-Elantey wants to merge 1 commit into
masterfrom
fix/chemistry-set-recipe-matching

Conversation

@Eldrinn-Elantey

Copy link
Copy Markdown

Summary

Recipes with duplicate ingredients required each copy to sit in its own slot, and vanilla shift-click always merges into an existing stack instead, so the layout for web, fractured bones or the lengthening catalyst could not be produced by shift-clicking or by any kind of item pipe. Ingredients are now counted across the input slots, so a single stack of five string works just as well as five slots holding one each.

Matching also accepted any superset of a recipe, leaving unrelated items in the slots unconsumed and making the outcome depend on the registration order. Every non-empty slot now has to be part of the recipe.

Consumption used its own comparison rules that had drifted from the matching ones and could decrement a different slot than the one that was matched. Both now come from a single pass that returns the per-slot amounts, which also fixes a stack of two container items collapsing into one empty container.

The one-item-per-slot layout keeps working, so existing setups stay valid.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

Recipes with duplicate ingredients required each copy to sit in its own slot, and vanilla shift-click always merges into an existing stack instead, so the layout for web, fractured bones or the lengthening catalyst could not be produced by shift-clicking or by any kind of item pipe. Ingredients are now counted across the input slots, so a single stack of five string works just as well as five slots holding one each.

Matching also accepted any superset of a recipe, leaving unrelated items in the slots unconsumed and making the outcome depend on the registration order. Every non-empty slot now has to be part of the recipe.

Consumption used its own comparison rules that had drifted from the matching ones and could decrement a different slot than the one that was matched. Both now come from a single pass that returns the per-slot amounts.
@Eldrinn-Elantey
Eldrinn-Elantey requested a review from a team August 29, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant