Skip to content

Fix stacked crafting ingredient consumption - #2013

Open
cryptnetworks wants to merge 1 commit into
MrTJP:1.12.xfrom
cryptnetworks:fix/stacked-crafting-ingredients
Open

Fix stacked crafting ingredient consumption#2013
cryptnetworks wants to merge 1 commit into
MrTJP:1.12.xfrom
cryptnetworks:fix/stacked-crafting-ingredients

Conversation

@cryptnetworks

@cryptnetworks cryptnetworks commented Aug 5, 2026

Copy link
Copy Markdown

What changed

  • Determine the minimum number of items a candidate stack needs for each crafting slot while preserving the selected recipe and output.
  • Consume that recipe-required count instead of always shrinking the source stack by one.

The 1.12.x project bench crafting helper always removed exactly one item for every occupied crafting slot. Modded recipes can require larger per-slot stack sizes; IC2 Classic's plasma core recipe, for example, requires two magnets or four advanced alloys in its respective slots. ProjectRed would produce the output while under-consuming those ingredients, causing the duplication reported in xJon/Tekkit-2#266.

The new lookup still resolves to one item for vanilla-style recipes, while count-sensitive recipes consume the smallest stack size that continues to match and produces the same output. Candidate item substitutions remain subject to the existing recipe and output checks.

Validation

  • ./gradlew compileScala --no-daemon with Temurin JDK 8
  • ./gradlew build --no-daemon with Temurin JDK 8
  • git diff --check

Related: xJon/Tekkit-2#266

@cryptnetworks
cryptnetworks marked this pull request as ready for review August 5, 2026 01:21
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