Mekanism

Mekanism

111M Downloads

[1.11.2] JEI integration completely broken.

Ristovski opened this issue ยท 16 comments

commented

With the latest Mekanism version (Currently 20cf847) JustEnoughItems fails to load almost all all recipes that are done in a crafting bench. This causes JEI's recipe viewer to not work with Mekanism.

JEI version: jei_1.11.2-4.3.2

Issues for reference: #4319 (Confirmed fixed original issue, doesn't fix JEI integration though.)

commented

Downgrading JEI fix the recipes not showing. I'm using jei_1.11.2-4.2.10.248 and everything is fine. Not sure why tho.

commented

I saw there where some changes to the api between 4.2 and 4.3. I'll look what's changed and why it breaks compatability

commented

What do you mean with fails to load? In my workspace they show up and it had a + to move items to the workbench.

commented

Indeed seems to be some API change shenanigans. Weird how it only affects Mekanism though.

commented

Could be that Mekanism is using an outdated API which has been removed.

commented

Well... Looking at the start-up log explains a lot:
https://gist.github.com/thommy101/833a45670461a39bed96b0109257c99e

There's something wrong with the implementation and/or the new API of JEI.

commented

Opened an issue (help request) over at the repository of JEI. Hopefully someone can point in the direction to look as I don't see anything wrong (aside from using in the latest version deprecated stuff, which should still work in a grace period)

commented

Then we have no Mekanism-Receips when we use the fresh .266 Release?

And when the JEI-Api completly is removed then must the standard very basic receipes showable, or?

commented

Sorry I only gave a technical explanation of the issue and solution.
At a high level, Mekanism just needs to fix their JEI plugin. It will function the same.

commented

No Problem was an important technical explanation. Good point for search.

Only jei_1.11.2-4.2.10.248.jar are usably at the moment with Mekanims 1.11.2 Dev-Versions.

commented

I looked into it more and Mekanism is using a JEI internal class, BrokenCraftingRecipeException.
The location of this class has changed, so Mekanism's integration broke.

I recommend removing the try/catch from mekanism.client.jei.crafting.ShapedMekanismRecipeWrapper#getIngredients since any crash there should already be handled by JEI.

Since Mekanism does not update very frequently, it's incredibly important that it avoids importing any JEI internal classes. If there are any imports of mezz.jei. that aren't mezz.jei.api. they can break, so they should be removed.

commented

Strange Things will be happend:).

jei_1.11.2-4.2.10.248.jar

will be shown as JEI 4.3.2.264 in MOD-Options and set automaticly S:filterText=@mekanism when i try to get an Mekanism-Recipe.

???

commented

I have it resolved, i think my test jars from mekanism has caused this strange error:).

commented

I've got it fixed locally. Removed all non API calls to JEI and changed the dependencies to compile against the API instead of the full jar of JEI.

I'll open a PR later today.

Thanks to Mezz for pointing in the right direction.. Don't know why I didn't found that one :/

commented

Fixed on my end, thanks a bunch!

commented

Nice! Maybe a good idea to use the API as deobfcompile instead full JEI source. That way your certain that you don't use unwanted code.
https://github.com/mezz/JustEnoughItems/wiki/Getting-Started#why-compile-against-the-api