Low-Drag-MC / LDLib-MultiLoader

GNU General Public License v3.0
13 stars 17 forks source link

Crashes with JEI 15.8.0.10 on Minecraft 1.20.1 #29

Closed mezz closed 4 months ago

mezz commented 4 months ago

I released a new version of JEI with backports for features in later versions. LDLib crashes because it has unsafe mixins into JEI.

Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Invalid descriptor on ldlib-common.mixins.json:jei.JeiRecipeLayoutMixin->@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 -> Apply Injections ->  -> Inject -> ldlib-common.mixins.json:jei.JeiRecipeLayoutMixin->@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]

Mixins to other mods should be avoided or done in a fail-safe way. You can set require = 0 on injects, for example. If the target is not found, you can log an error and link to the issue tracker here.

What is the mixin into JEI required for? Generally I try to support mods in the API so that they have a stable way to work with the mod.

vfyjxf commented 4 months ago

This is related to the problem I mentioned a long time ago, that ldlib is difficult or impossible to implement Scroll Grid and other widgets in a jei recipe layout, so I used a very hacky technique

vfyjxf commented 4 months ago

In other words, ldlib wants to implement its own set of widgets in jei, but jei doesn't provide a api.