Skip to content

Stop reporting invalid inputs for jobs that only wait for their interface - #246

Merged
rubensworks merged 2 commits into
master-1.21-ltsfrom
fix/stale-invalid-inputs
Oct 12, 2026
Merged

rubensworks merged 2 commits into
master-1.21-ltsfrom
fix/stale-invalid-inputs

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Problem

If a crafting interface's target refuses a job's inputs, the job is marked as having invalid inputs. That happens for example when a furnace is still smelting something else. The job then reports INVALID_INPUTS, which terminals show as "Recipe Not Allowed" in red.

Pending jobs are only tested again while the interface has room to start a job. Once one of the refused jobs starts, that room is gone, so the other refused jobs keep their mark for as long as the running job takes. That stays true even if the target has accepted inputs in the meantime. In a hopper minecart job with iron smelted in a furnace, the second iron job reported INVALID_INPUTS for about 1000 ticks while it was only waiting for the first one. Crafting itself completes correctly; only the reported status is wrong.

Fix

Once CraftingJobHandler has inserted a started job into the target, it clears the mark on that handler's other pending jobs. They were tested against the target's previous state, so they now report PENDING_INTERFACE.

  • The marks are only cleared after a successful insertion. If the target refuses the inputs on the real insertion, its state did not change, so the other jobs keep their mark.
  • Cleared jobs are tested again on the next attempt, so a target that keeps refusing is still reported.

Testing

  • New game test GameTestsItemsCraftBusyTarget.testRefusedJobsWaitForInterfaceOnceAnotherJobStarts:
    • Two smelting jobs are scheduled while the furnace holds raw gold, so both are refused first.
    • Once one of them is processing, the other must report PENDING_INTERFACE.
    • Without the fix it fails with: Expected Status of the waiting job to be PENDING_INTERFACE, but was INVALID_INPUTS.
  • ./gradlew build passes, and ./gradlew runGameTestServer passes all 80 game tests.
  • Reproduced in game with Integrated Terminals' crafting job view before the fix (furnace pre-filled with raw gold, hopper minecart job). The fix itself was verified with the game test, not in that dev client, which uses the released Integrated Crafting jar.

The same fix for 1.20 is in #247, without the game test. Integrated Terminals also stops showing INVALID_INPUTS as a failure in CyclopsMC/IntegratedTerminals#233.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y

…face

When the target of a crafting interface refused a job's inputs, for example a
furnace that was still busy, the job was marked as having invalid inputs. Jobs
are only tested again when the interface has room to start one, so once another
job started, the refused jobs kept that mark until the running job was done,
even if the target had accepted inputs again in the meantime. Terminals showed
them as failed for that whole time.

Starting a job now clears the mark on the other pending jobs of the same
interface, as their earlier test no longer applies. They are tested again on
the next attempt, so a target that keeps refusing is still reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y
If the target refused the inputs on insertion after all, its state did not
change, so the other jobs keep their mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y
@rubensworks
rubensworks merged commit 33a005c into master-1.21-lts Oct 12, 2026
7 checks passed
@rubensworks
rubensworks deleted the fix/stale-invalid-inputs branch October 12, 2026 17:15
rubensworks pushed a commit to CyclopsMC/IntegratedTerminals that referenced this pull request Oct 12, 2026
This version stops reporting crafting jobs as having invalid inputs while they
only wait for their crafting interface (CyclopsMC/IntegratedCrafting#246).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C5iUzweRYoCkKB5bvJdH8Y
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.

2 participants