Skip to content

Show icons for crafting requirements - #210

Merged
rubensworks merged 5 commits into
master-1.21-ltsfrom
claude/integrated-terminals-206-crafting-requirement-icons
Aug 29, 2026
Merged

Show icons for crafting requirements#210
rubensworks merged 5 commits into
master-1.21-ltsfrom
claude/integrated-terminals-206-crafting-requirement-icons

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Closes #206

The tooltip of a craftable ingredient in the storage terminal used to list the crafting requirements as plain ingredient names. It now renders them as a grid of ingredient icons with their quantities, below the existing Crafting Requirements: line.

Behaviour

  • Requirements are drawn as vanilla-styled slots, reusing the terminal storage handler of each ingredient type, so items, fluids and energy all render just like they do in the crafting plan gui.
  • The grid wraps at 9 columns, and the requirements are spread evenly over the resulting rows, so recipes with many inputs never run off the screen.
  • Inputs that accept multiple ingredients (e.g. tag-based recipe inputs) cycle over their alternatives within their own slot, every 1.5s, the same way the crafting plan gui cycles over alternatives.

Implementation

  • ITerminalCraftingOption#getInputAlternatives is a new defaulted method that exposes all alternatives per input, where getInputs only exposes the first one. TerminalCraftingOptionRecipeDefinition overrides it to expose the alternatives of the underlying recipe definition.
  • CraftingOptionIngredientsTooltip is a TooltipComponent holding those inputs, which is rendered by ClientCraftingOptionIngredientsTooltip.
  • IIngredientComponentTerminalStorageHandler#drawInstance gained an overload that also accepts an optional visual TooltipComponent. The old signature is kept as a default that passes null, so all existing callers are unaffected.
  • CyclopsCore's tooltip helper can only render text lines, so when a visual component is present, the tooltip is rendered through vanilla's renderComponentTooltipFromElements instead (see TooltipRenderHelpers). This looks the same, but additionally supports visual components and line wrapping.

Testing

  • ./gradlew build passes.
  • ./gradlew runGameTestServer passes, including 2 new game tests covering getInputAlternatives for single and multiple alternatives.

Generated by Claude Code

claude added 3 commits August 28, 2026 19:24
The tooltip of a craftable ingredient in the storage terminal now renders
the required ingredients as a grid of icons with their quantities,
instead of listing their names.

The grid wraps at 9 columns and spreads the ingredients evenly over the
resulting rows, and inputs that accept multiple ingredients cycle over
their alternatives in place.

Closes #206

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXSSyBp141iYXqQbeqHugN
…egrated-terminals-206-crafting-requirement-icons

# Conflicts:
#	src/main/java/org/cyclops/integratedterminals/core/terminalstorage/slot/TerminalStorageSlotIngredientCraftingOption.java
Recipes commonly require the same ingredient in multiple slots,
which took up a separate icon for every occurrence.
Such inputs are now shown as a single icon
with the sum of their quantities.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXSSyBp141iYXqQbeqHugN
Deprecate the old drawInstance signature,
and register the tooltip component factory from the ClientProxy
instead of a separate event subscriber.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXSSyBp141iYXqQbeqHugN
Comment thread src/main/java/org/cyclops/integratedterminals/IntegratedTerminals.java Outdated
@rubensworks
rubensworks merged commit 4b1fe26 into master-1.21-lts Aug 29, 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.

2 participants