Skip to content

Show recipe in item viewer for hovered queue entry - #101

Merged
paulyhedral merged 6 commits into
1.18from
feature/13-show-recipe-in-jei
Sep 29, 2026
Merged

paulyhedral merged 6 commits into
1.18from
feature/13-show-recipe-in-jei

Conversation

@paulyhedral

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Show Recipe key binding (default: R) that opens the JEI recipe display for whatever item the player is hovering in the Craft Queue overlay
  • Routes the action through a new RecipeViewerProvider/RecipeViewerRegistry abstraction, keeping all JEI API calls confined to integration/jei/JeiRecipeViewerProvider
  • Overlay hover tracking: CraftQueueOverlay now hit-tests each rendered product/intermediate row each frame and exposes the hovered ItemStack — silently inert when the mouse is elsewhere or no viewer is installed

Files changed (this feature)

File Purpose
integration/RecipeViewerProvider.java New interface: showRecipesFor(ItemStack)
integration/RecipeViewerRegistry.java Registry; dispatches with per-provider exception isolation
integration/jei/JeiRecipeViewerProvider.java JEI implementation via IFocusFactory + IRecipesGui.show()
integration/jei/CTPlugin.java Registers JeiRecipeViewerProvider in onRuntimeAvailable
client/overlay/CraftQueueOverlay.java Tracks hoveredItem; per-row mouse hit-test each render frame
common/Constants.java TRANSLATION_KEY_BINDINGS_SHOW_RECIPE_TITLE
common/registry/ModKeyBindings.java SHOW_RECIPE_MAPPING (default key: R)
client/event/ClientEventHandler.java Dispatches SHOW_RECIPE_MAPPING → RecipeViewerRegistry.showRecipesFor
data/CTLangProvider.java "Show Recipe" / "Rezept anzeigen" in en_us, en_gb, de_de
src/generated/…/lang/*.json Regenerated lang files

Test plan

  • Launch client (./gradlew client) with JEI installed
  • Add items to the craft queue
  • Open a container screen (crafting table, inventory)
  • Hover mouse over a product or intermediate entry in the CT overlay — pressing R should open JEI recipe display for that item
  • Verify pressing R with no item hovered does nothing
  • Verify all existing key bindings (Q add, L toggle, M manager, etc.) are unaffected
  • Verify no crash when JEI is absent (provider list is empty → no-op)

Closes #13

🤖 Generated with Claude Code

@paulyhedral
paulyhedral changed the base branch from master to 1.18 June 22, 2026 05:23
@paulyhedral paulyhedral self-assigned this Jun 22, 2026
@paulyhedral paulyhedral linked an issue Jun 22, 2026 that may be closed by this pull request
@paulyhedral paulyhedral added the enhancement New feature or request label Jun 22, 2026
@paulyhedral paulyhedral added this to the 1.0 milestone Jun 22, 2026
@paulyhedral paulyhedral changed the title feat(#13): show recipe in item viewer for hovered queue entry Show recipe in item viewer for hovered queue entry Jun 22, 2026
@paulyhedral
paulyhedral merged commit 38affc7 into 1.18 Sep 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show recipe in JEI

1 participant