Issue while loading JEI in a modding environment (Forge 1.12.2)
Mysterios1 opened this issue ยท 4 comments
I am currently creating a mod with forge version 1.12.2-14.23.5.2854 and today I wanted to try to do JEI integration but as soon as I tried to compile and start minecraft via eclipse with JEI in the mods folder of the run directory for debugging purposes I got this error:
( no errors in the log until this point):
[19:39:48] [Client thread/INFO] [FML]: Applying holder lookups
[19:39:48] [Client thread/INFO] [FML]: Holder lookups applied
[19:39:48] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: ---- Minecraft Crash Report ----
// There are four lights!
Time: 2/24/21 7:39 PM
Description: There was a severe problem during mod loading that has caused the game to fail
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Just Enough Items (jei)
Caused by: net.minecraft.util.ReportedException: Registering texture
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:95)
at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:52)
at mezz.jei.startup.ProxyCommonClient.init(ProxyCommonClient.java:114)
at mezz.jei.JustEnoughItems.init(JustEnoughItems.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:749)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
at net.minecraft.client.Minecraft.init(Minecraft.java:535)
at net.minecraft.client.Minecraft.run(Minecraft.java:378)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.legacydev.Main.start(Main.java:86)
at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
Caused by: java.lang.IllegalAccessError: tried to access method net.minecraft.client.renderer.texture.TextureMap.initMissingImage()V from class mezz.jei.gui.textures.JeiTextureMap
at mezz.jei.gui.textures.JeiTextureMap.loadTexture(JeiTextureMap.java:43)
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:69)
... 50 more
I have searched for the mentioned class (net.minecraft.client.renderer.texture.TextureMap) in the minecraft source provided by forge and it seems that the requested method initMissingImage() is private and therefore not accessible:
(method copied from net.minecraft.client.renderer.texture.TextureMap)
private void initMissingImage()
{
int[] aint = TextureUtil.MISSING_TEXTURE_DATA;
this.missingImage.setIconWidth(16);
this.missingImage.setIconHeight(16);
int[][] aint1 = new int[this.mipmapLevels + 1][];
aint1[0] = aint;
this.missingImage.setFramesTextureData(Lists.<int[][]>newArrayList(aint1));
}
The interesting thing is that as soon as I try to load JEI with the same forge version in vanilla this error doesn't appear.
I have also tested if this behavior only exists for the latest 1.12.2 version of JEI and found out that this is not the case.
In fact I have tried like 4 different JEI versions and always got the same result. I don't know how much can be done about this error but I thought it could be useful if I submit this issue here.
Was there a solution found for this? Same issue in jei_version=4.16.1.302 , forge 14.23.5.2860 , both latest as of posting.
Im trying to update an old project to FG3+ , or if not that at least get an IDE running in it. same logs show for me for loading assets
Hmm it looks like JEI's Access Transformers (ATs) are not being applied in dev here.
I think there was a big issue with FG3 where it doesn't apply dependency ATs at all.
As a workaround you may need to copy JEI's ATs into your own AT file.
- P.S.: Of course I didn't test in vanilla, I meant forge modified minecraft via the minecraft launcher
Sorry for the late response. If you are still having this issue, you can get developer troubleshooting help for things like this in the JEI Discord here: https://discord.gg/sCQcWU2