mezz / JustEnoughItems

Item and Recipe viewing mod for Minecraft
https://www.curseforge.com/minecraft/mc-mods/jei
MIT License
771 stars 302 forks source link

[Crash]: MixinTransformerError: An unexpected critical error was encountered #3599

Closed evhub closed 1 month ago

evhub commented 1 month ago

Steps to Reproduce the Crash

After updating JEI from 15.3.0.8 to 15.8.0.11, when the client joins the server, it causes a client crash.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

Minecraft 1.20.1 Forge 47.3.0

Extra Notes (Optional)

No response

Crash Report

https://gist.github.com/evhub/3587343d0f2957f89836c644517a7904

Mysticpasta1 commented 1 month ago

Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Invalid descriptor on ldlib-common.mixins.json:jei.JeiRecipeLayoutMixin from mod ldlib->@Inject::injectCreate(Lmezz/jei/api/recipe/category/IRecipeCategory;Ljava/util/Collection;Ljava/lang/Object;Lmezz/jei/api/recipe/IFocusGroup;Lmezz/jei/api/runtime/IIngredientManager;Lmezz/jei/api/runtime/IIngredientVisibility;Lmezz/jei/api/helpers/IModIdHelper;Lmezz/jei/common/gui/textures/Textures;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V! Expected (Lmezz/jei/api/recipe/category/IRecipeCategory;Ljava/util/Collection;Ljava/lang/Object;Lmezz/jei/api/recipe/IFocusGroup;Lmezz/jei/api/runtime/IIngredientManager;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V but found (Lmezz/jei/api/recipe/category/IRecipeCategory;Ljava/util/Collection;Ljava/lang/Object;Lmezz/jei/api/recipe/IFocusGroup;Lmezz/jei/api/runtime/IIngredientManager;Lmezz/jei/api/runtime/IIngredientVisibility;Lmezz/jei/api/helpers/IModIdHelper;Lmezz/jei/common/gui/textures/Textures;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V [INJECT Applicator Phase -> ldlib-common.mixins.json:jei.JeiRecipeLayoutMixin from mod ldlib -> Apply Injections -> -> Inject -> ldlib-common.mixins.json:jei.JeiRecipeLayoutMixin from mod ldlib->@Inject::injectCreate(Lmezz/jei/api/recipe/category/IRecipeCategory;Ljava/util/Collection;Ljava/lang/Object;Lmezz/jei/api/recipe/IFocusGroup;Lmezz/jei/api/runtime/IIngredientManager;Lmezz/jei/api/runtime/IIngredientVisibility;Lmezz/jei/api/helpers/IModIdHelper;Lmezz/jei/common/gui/textures/Textures;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V]

mezz commented 1 month ago

Thanks for the report! This is caused by LDLib, which uses mixins to change JEI's code but fails on the new version. I opened a bug with them here: https://github.com/Low-Drag-MC/LDLib-Architectury/issues/29 LDLib is included in GregTech CEU for 1.20.1, which is a common source of the error here.

Yefancy commented 1 month ago

As we known taht the scroll wheel would switch recpe pages, but the multiblock preview in gregtech uses the wheel to scale the scene, so ldlib injects code into jei in a very hacky way.

Therefore, LDLib expects to have APIs that provide all the events as vanilla widgets (click drag move scroll keytype, etc). To keep original jei behaviors, you can trigger such events while mouse is staying in the layout box.

mezz commented 1 month ago

I am looking into how JEI might support that better, I think it's worthwhile.

mezz commented 1 month ago

This has been fixed in the latest version of LDLib. We will have to wait for mods like gtceu-1.20.1 to update their version of it.