Skip to content

Allow going back from the crafting plan gui to the amount gui - #208

Merged
rubensworks merged 2 commits into
master-1.20-ltsfrom
claude/fervent-pasteur-ng4mje
Aug 22, 2026
Merged

Allow going back from the crafting plan gui to the amount gui#208
rubensworks merged 2 commits into
master-1.20-ltsfrom
claude/fervent-pasteur-ng4mje

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Implements CyclopsMC/IntegratedCrafting#140.

The GUIs involved live in this repo, not in IntegratedCrafting, so the fix lands here.

Problem

In the storage terminal's autocrafting flow (click item → set amount → Next → crafting plan), pressing ESC on the crafting plan screen closed the whole GUI instead of stepping back. Neither screen had an explicit back button.

Changes

ContainerScreenTerminalStorageCraftingPlan

  • ESC now calls returnToCraftingOptionAmount(), which re-opens the amount step server-side through the existing TerminalStorageIngredientOpenCraftingJobAmountGuiPacket, passing the same CraftingOptionGuiData. When no crafting option is attached, it falls back to the previously unused returnToTerminalStorage().
  • Added a Back button left of Craft, in the free strip between it and the view-toggle button.

ContainerScreenTerminalStorageCraftingOptionAmount

  • Added a < back button (tooltip Back) between the +10/-10 buttons, left of the number field, wired to the ESC behaviour that already existed on this screen.
  • The amount field now initializes from getCraftingOptionGuiData().getAmount() (clamped via validateNumber) instead of a hardcoded "1", so the entered amount survives the round trip back from the plan screen.

lang/en_us.json

  • Added gui.integratedterminals.terminal_storage.step.back. Other locales come from Crowdin.

Note on the shift-click shortcut

Shift-clicking an item jumps straight to the plan, skipping the amount step. Back/ESC from there lands on the amount screen rather than the terminal — one step back in the wizard, which also lets the amount be adjusted. Happy to change it to return to the terminal in that case instead.

Verification

./gradlew build spotlessCheck passes (compile, javadoc, shadowJar, Spotless). :test is NO-SOURCE on this branch, and game tests only exist on 1.21+. The changes are visual GUI behaviour and were not exercised in a running client.

🤖 Generated with Claude Code

https://claude.ai/code/session_017xtbsQuaXzvi2CpfzksJbp


Generated by Claude Code

rubensworks and others added 2 commits August 20, 2026 17:03
Pressing ESC in the crafting plan gui now re-opens the gui in which the
crafting amount can be set, instead of closing the whole gui.
Both guis also get an explicit back button,
and the previously entered amount is remembered when going back.

Closes CyclopsMC/IntegratedCrafting#140

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xtbsQuaXzvi2CpfzksJbp
@rubensworks
rubensworks merged commit 2f210e7 into master-1.20-lts Aug 22, 2026
3 checks passed
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