Show the crafting machine in crafting option tooltips - #216
Merged
Conversation
Hovering a craftable in the storage terminal now says which machine it is crafted in, both by name and by icon, above the crafting requirements. The machines are resolved server-side once per channel, from the crafting interfaces that expose each recipe, and travel to the client alongside the recipe. Interfaces that target the same machine type are only shown once, and the label names the machine only when there is exactly one of them. To let the machines and the requirements each get their own labelled icon grid, tooltips are now built as a list of elements that mixes text and visual components, rather than a list of lines with a single trailing component. Closes #181 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid
rubensworks
force-pushed
the
feature/crafting-machine-tooltip
branch
from
September 6, 2026 13:38
95ca62b to
6b80ecf
Compare
Integrated Crafting 1.6.0-715 is the first released build with ICraftingInterface#getTargetMachineItem(), which this feature reads. It requires newer CyclopsCore and CommonCapabilities than were pinned here, so those move to the versions Integrated Crafting itself builds against. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid
rubensworks
added a commit
to CyclopsMC/IntegratedMekanism
that referenced
this pull request
Sep 6, 2026
CyclopsMC/IntegratedTerminals#216 replaces drawInstance's single tooltip component with a list of elements that mixes text and visual components, so that a tooltip can label more than one icon grid. Follow that signature, and bump CommonCapabilities and Integrated Crafting to the versions that change requires. Do not merge before Integrated Terminals has released the change, and integratedterminals_version is bumped to that release. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid
rubensworks
added a commit
to CyclopsMC/IntegratedMekanism
that referenced
this pull request
Sep 6, 2026
…meter Integrated Terminals 1.9.0-963 is the first released build carrying CyclopsMC/IntegratedTerminals#216, whose drawInstance signature this follows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid
rubensworks
added a commit
to CyclopsMC/IntegratedMekanism
that referenced
this pull request
Sep 6, 2026
Aligns to the API changes in CyclopsMC/IntegratedTerminals#216
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.
Closes #181
Hovering a craftable in the storage terminal now says which machine it is crafted in, by name and by icon, below the crafting requirements.
When several distinct machines expose the same recipe, the label drops the name and the icons speak for themselves (
Crafted In:followed by one icon per machine). Interfaces targeting the same machine type are shown once.How it works
The machines are resolved server-side in
TerminalStorageTabIngredientCraftingHandlerCraftingNetwork, once per channel, fromICraftingNetwork#getRecipeCraftingInterfacesandICraftingInterface#getTargetMachineItem(). Each interface's machine is resolved at most once per call, since many recipes are commonly exposed by the same interface. They are serialized alongside the recipe and carried to the client on the crafting option, exposed generically throughITerminalCraftingOption#getCraftingMachines()(defaulting to empty, so handlers that cannot determine them are unaffected and write nothing).To give the machines and the requirements each their own labelled icon grid, tooltips are now built as a
List<Either<FormattedText, TooltipComponent>>that mixes text and visual components, rather than a list of lines plus a single trailing component. That changes the last parameter ofIIngredientComponentTerminalStorageHandler#drawInstance; the shared slot-grid rendering moved into aClientCraftingOptionSlotsTooltipbase class that both grids extend.Downstream implementors
IIngredientComponentTerminalStorageHandleris implemented outside this repo by Integrated Mekanism. CyclopsMC/IntegratedMekanism#29 follows this signature and should be merged and released after this PR.Note that Integrated Mekanism is already broken against Integrated Terminals 1.9.0, independently of this PR: #210 made the
TooltipComponentvariant ofdrawInstancethe abstract method, which Integrated Mekanism never implemented, so chemicals throw anAbstractMethodErrorfor craftables and crafting job outputs. CyclopsMC/IntegratedMekanism#28 fixes that on its own and can be merged now.Dependency bumps
ICraftingInterface#getTargetMachineItem()was added in CyclopsMC/IntegratedCrafting#225 and first published in Integrated Crafting1.6.0-715, which this now pins.That build requires newer CyclopsCore and CommonCapabilities than were pinned here, so those move to the versions Integrated Crafting itself builds against:
integratedcrafting_versioncyclopscore_versioncommoncapabilities_versionintegrateddynamics_versionandintegratedtunnels_versionalready matched Integrated Crafting's and are unchanged.Testing
New game tests in
GameTestTerminalCraftingOptionMachines: serialization round-trip (with and without machines), machine resolution from a live network for the regular and the attuned crafting interface against a crafting table and a furnace, and deduplication across two interfaces on the same machine type../gradlew buildand./gradlew runGameTestServerboth pass against the released Integrated Crafting build, on this branch rebased onto1a98691.Verified in a dev client with clientdevbridge-cli, for the regular and the attuned crafting interface against a crafting table and a furnace, plus the multiple-machine case.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RM86uiqD4soLkMyjC9Eeid