Skip to content

Fix JEI integration for JEI 19.42+ (1.21.1) - #636

Open
Soteyl wants to merge 1 commit into
MrCrayfish:multiloader/1.21.1from
Soteyl:fix/jei-19.44-compat
Open

Soteyl wants to merge 1 commit into
MrCrayfish:multiloader/1.21.1from
Soteyl:fix/jei-19.44-compat

Conversation

@Soteyl

@Soteyl Soteyl commented Aug 23, 2026

Copy link
Copy Markdown

Fixes the JEI integration crash reported in #633, on the multiloader/1.21.1 branch.

Problem

With any JEI from 19.42.0.379 onwards, the client crashes the moment JEI builds its GUI:

MixinTransformerError: An unexpected critical error was encountered
  at mezz.jei.gui.startup.OverlayHelper.createIngredientListOverlay
  at mezz.jei.gui.startup.JeiGuiStarter.start
Caused by: MixinApplyError: Mixin [controllable.common.mixins.json:
  client.jei.IngredientListOverlayMixin from mod controllable] FAILED during APPLY
Caused by: InvalidAccessorException: No candidates were found matching
  contents:Lmezz/jei/gui/overlay/IngredientGridWithNavigation;
  in mezz/jei/gui/overlay/IngredientListOverlay

JEI made two changes:

  • the overlay internals moved from mezz.jei.gui.overlay into the mezz.jei.gui.overlay.ingredients subpackage;
  • IngredientListOverlay#contents is now typed as the IIngredientListOverlayContents interface instead of IngredientGridWithNavigation.

IngredientGridMixin and IngredientGridWithNavigationMixin target classes that no longer exist, so @Pseudo makes Mixin skip them with a warning. IngredientListOverlayMixin however targets a class that does still exist, so it is applied — and the accessor for the retyped field then fails hard, taking the client down.

The last JEI release that still matches the current accessors is 19.27.0.346. Note that a class-level check is not enough to find the boundary: mezz.jei.gui.overlay.IngredientGrid and IngredientGridWithNavigation still exist up to 19.39.0.372, but IngredientListOverlay#contents was already retyped in 19.32.0.358.

Changes

  • IngredientListOverlayMixincontrollableGetContents() returns IIngredientListOverlayContents.
  • IngredientGridWithNavigationMixin, IngredientGridMixin — imports moved to mezz.jei.gui.overlay.ingredients.
  • JeiSupport — imports updated; because contents is now an interface, the cast to IngredientGridWithNavigation is no longer guaranteed by the field type, so it is guarded with an instanceof check and bails out instead of throwing.
  • jei_version bumped to 19.44.0.403.

PageNavigationMixin and MouseUtilMixin are untouched — mezz.jei.gui.PageNavigation and mezz.jei.gui.input.MouseUtil are unchanged. Every accessed field kept its name (contents, configButton, navigation, ingredientGrid, ingredientListRenderer, nextButton, backButton), so controllable.common.mixins.json needs no changes either.

Testing

Built locally and played on a Steam Deck: Minecraft 1.21.1, NeoForge 21.1.248, JEI 19.44.0.403, alongside Create, Sodium/Iris, Sophisticated Backpacks and others.

  • no crash on world join or when opening a container;
  • the ingredient list overlay renders and toggles normally;
  • controller navigation across JEI slots, the page buttons and the config button works;
  • the log no longer contains MixinApplyError, InvalidAccessorException, or Skipping virtual target mezz.jei..., and debug.log confirms IngredientListOverlayMixin is actually applied to mezz.jei.gui.overlay.IngredientListOverlay.

Other branches

multiloader/26.1.2 and multiloader/26.2 carry the same breakage. multiloader/26.2 has already started the migration — it imports IIngredientListOverlayContents — but still imports mezz.jei.gui.overlay.IngredientGridWithNavigation. Happy to port this across if that is useful.

JEI moved the ingredient list overlay internals into the
mezz.jei.gui.overlay.ingredients subpackage and changed the type of
IngredientListOverlay#contents to the IIngredientListOverlayContents
interface. The accessor mixins still referenced the old locations, so
IngredientListOverlayMixin failed to apply and crashed the client as
soon as JEI built its GUI.

Update the accessor mixins to the new package layout and adjust
JeiSupport accordingly. Since contents is now typed as an interface,
the cast to IngredientGridWithNavigation is no longer guaranteed by
the field type, so it is guarded with an instanceof check.

PageNavigationMixin and MouseUtilMixin needed no changes: PageNavigation
and MouseUtil are unchanged, and every accessed field kept its name.

Closes MrCrayfish#633
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.

1 participant