Skip to content

Resolve JEI keybindings at lookup time and clear stale runtime - #893

Open
Siilent-Sea wants to merge 1 commit into
VazkiiMods:1.21.xfrom
Siilent-Sea:fix/jei-keybindings-lifecycle-1.21.1-20261101
Open

Siilent-Sea wants to merge 1 commit into
VazkiiMods:1.21.xfrom
Siilent-Sea:fix/jei-keybindings-lifecycle-1.21.1-20261101

Conversation

@Siilent-Sea

Copy link
Copy Markdown

Patchouli 93 can permanently retain null JEI key mappings when they are unavailable during PatchouliJeiPlugin static initialization. In the tested 1.21.1 / JEI 19.64.0.455 combination, the early warning is logged and in-book recipe/uses shortcuts do not recover when the mappings become available later. The plugin also retains its old IJeiRuntime after JEI calls onRuntimeUnavailable().

Resolve the two current map entries inside handleRecipeKeybind, clear the runtime in onRuntimeUnavailable(), and safely decline the lookup while the runtime is absent. A lifecycle regression test covers available → unavailable → available, with JEI's common API added to the test dependencies. The patch leaves upstream Minecraft/loader/version settings intact.

Verification:

  • ./gradlew :Xplat:test: 2 tests, zero failures, on current 1.21.x base df6bde4ca0cd496188c914a22c25d751a098687d.
  • The modified plugin source is byte-identical to the locally tested Patchouli 93 build. In a Minecraft 1.21.1 / NeoForge 21.1.265 singleplayer test pack with JEI 19.64.0.455, R/U opens recipes/uses before and after world re-entry; remapped G/H works with the old keys inactive.
  • With JEI and JER removed, the book still opens and the tested shortcut input paths remain safe.

The exact initialization order across every loader/JEI version and multiplayer were not verified. These are the stated singleplayer and lifecycle cases, not whole-pack acceptance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant