Allow going back from the crafting plan gui to the amount gui - #208
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ContainerScreenTerminalStorageCraftingPlanreturnToCraftingOptionAmount(), which re-opens the amount step server-side through the existingTerminalStorageIngredientOpenCraftingJobAmountGuiPacket, passing the sameCraftingOptionGuiData. When no crafting option is attached, it falls back to the previously unusedreturnToTerminalStorage().Backbutton left ofCraft, in the free strip between it and the view-toggle button.ContainerScreenTerminalStorageCraftingOptionAmount<back button (tooltipBack) between the+10/-10buttons, left of the number field, wired to the ESC behaviour that already existed on this screen.getCraftingOptionGuiData().getAmount()(clamped viavalidateNumber) instead of a hardcoded"1", so the entered amount survives the round trip back from the plan screen.lang/en_us.jsongui.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 spotlessCheckpasses (compile, javadoc, shadowJar, Spotless).:testisNO-SOURCEon 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