Skip to content

feat: make JEI an optional dependency - #98

Merged
paulyhedral merged 18 commits into
1.18from
feature/97-remove-jei-hard-dep
Jun 22, 2026
Merged

paulyhedral merged 18 commits into
1.18from
feature/97-remove-jei-hard-dep

Conversation

@paulyhedral

@paulyhedral paulyhedral commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Introduces a HoverItemProvider abstraction and HoverProviderRegistry so item-under-mouse resolution is pluggable; JEI is no longer required at runtime.
  • Adds VanillaSlotHoverProvider (priority 0) that reads AbstractContainerScreen.hoveredSlot via a new access-transformer entry; adds JeiHoverProvider (priority 100) that reads the JEI ingredient overlay — registered only from CTPlugin.onRuntimeAvailable, keeping all JEI API imports isolated to CTPlugin and JeiHoverProvider.
  • Moves manager loading from CTPlugin (JEI-gated) to ClientEventHandler.onClientLogin so managers initialise on world join regardless of whether JEI is present.
  • Adds a native item picker to QueueManagementScreen (search box + scrollable list backed by ForgeRegistries.ITEMS) so players can queue items without JEI installed.
  • Changes mods.toml JEI dependency from mandatory=true → mandatory=false; updates CurseForge and Modrinth build declarations to optional.

Test plan

  • With JEI: hover item in JEI ingredient panel → press add-to-queue key → item appears in queue; hover item in container slot → same result; queue and shopping list load on world join
  • Without JEI (runtimeOnly currently commented out in build.gradle): no NoClassDefFoundError on startup; slot-hover-add works; native picker loads items, search filters, scroll works, click adds to queue; managers load on world join
  • Restore runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") in build.gradle after no-JEI testing is complete

Notes

Closes #97.

The runtimeOnly JEI line in build.gradle is temporarily commented out to facilitate no-JEI dev testing (see task 7.3). Restore it before or after merge once testing is confirmed.

🤖 Generated with Claude Code

paulyhedral and others added 6 commits June 21, 2026 07:00
Add hover providers for vanilla and JEI to get item information
Add item picker text box to queue manager

Refs: #97
Add hover providers for vanilla and JEI to get item information
Add item picker text box to queue manager

Refs: #97
Facilitates manual verification that the mod runs cleanly without JEI
installed (task 7.3). Restore this line after testing is complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@paulyhedral paulyhedral self-assigned this Jun 21, 2026
@paulyhedral paulyhedral added the enhancement New feature or request label Jun 21, 2026
@paulyhedral paulyhedral added this to the 1.0 milestone Jun 21, 2026
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@paulyhedral
paulyhedral merged commit ecba341 into 1.18 Jun 22, 2026
3 checks passed
@paulyhedral
paulyhedral deleted the feature/97-remove-jei-hard-dep branch June 22, 2026 01:10
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.

Remove JEI hard dependency

2 participants