Development [1.11.2] Proper API Installation?

Discussion in 'Support' started by SpikybumJolteon, Jun 4, 2017.

  1. SpikybumJolteon

    Joined:
    Jun 3, 2017
    Messages:
    5
    Likes Received:
    0
    I have started work on adding compatibility from my own modification, Kindred Legacy, to Galacticraft. I am experiencing several odd crashes with things I do not see in Galacticraft outside of the modding environment. Before I start reporting them, I want to make sure I have it installed correctly in the first place.

    I followed this tutorial pretty closely:

    When I start up the game in my IDE (Eclipse), one of the Warning messages I get is (and it flashes several times in the Console window):

    [19:42:58] [Client thread/WARN] [FML]: * The API Galacticraft API from source C:\Users\Eclipsis\Desktop\Minecraft Modding\Kindred Legacy-1.11.2-13.20.0.2228\run\mods\GalacticraftCore-1.11.2-4.0.0.107.jar is loaded from an incompatible classloader. THIS WILL NOT WORK!
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.ModAPIManager$APIContainer.validate(ModAPIManager.java:113)
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.ModAPIManager.registerDataTableAndParseAPI(ModAPIManager.java:173)
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.ModAPIManager.manageAPI(ModAPIManager.java:231)
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:536)
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:229)
    [19:42:58] [Client thread/WARN] [FML]: * at net.minecraft.client.Minecraft.init(Minecraft.java:478)...

    Right now, I can manipulate the code to a degree but to actually test it, I have to export a version of my mod and test it in an actual Minecraft game.

    I am developing in Forge 13.20.0.2228.
     
  2. radfast

    radfast Administrator
    Staff Member

    Joined:
    Apr 27, 2014
    Messages:
    1,146
    Likes Received:
    354
    That classloader warning in an IDE is normal, don't worry about it!

    But you shouldn't include the whole Galacticraft API in your workspace - the API includes prefab classes which are only meant for people coding Galacticraft add-ons (which require Galacticraft pre-loaded as a dependency) and these reference classes in the full Galacticraft mod, which you won't have.

    You should either select only the actual API class which you need - in this case IEntityBreathable - or else you can take the whole API except the prefab package.

    I also replied to you on Github with some other points :)
     
  3. SpikybumJolteon

    Joined:
    Jun 3, 2017
    Messages:
    5
    Likes Received:
    0
    Ah! I just looked at the forums. That is actually someone else. I already successfully implemented IEntityBreathable. In that case, it seems I have the stuff installed alright then. I have not take the time to test if my mod has any dependency problems yet though.

    My problem in my modding environment is that when I use a Rocket to launch to the space, the game crashes when the timer hits 0. Gives an error saying something about a GUI. (I tried posting this to Pastebin but the link wouldn't let me post this post.

    [12:24:58] [Client thread/FATAL]: Unreported exception thrown!
    java.lang.IllegalAccessError: tried to access field net.minecraft.client.gui.GuiIngame.overlayMessage from class micdoodle8.mods.galacticraft.core.tick.TickHandlerClient
    at micdoodle8.mods.galacticraft.core.tick.TickHandlerClient.onPreGuiRender(TickHandlerClient.java:327) ~[TickHandlerClient.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_55_TickHandlerClient_onPreGuiRender_Pre.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) ~[EventBus.class:?]
    at net.minecraftforge.client.GuiIngameForge.pre(GuiIngameForge.java:885) ~[GuiIngameForge.class:?]
    at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:117) ~[GuiIngameForge.class:?]
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1142) ~[EntityRenderer.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1140) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:407) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:26) [start/:?]
    [12:24:58] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:600]: ---- Minecraft Crash Report ----

    WARNING: coremods are present:
    MicdoodlePlugin (MicdoodleCore-1.11.2-4.0.0.107.jar)
    Contact their authors BEFORE contacting forge

    // Why is it breaking :(

    Time: 6/5/17 12:24 PM
    Description: Unexpected error

    java.lang.IllegalAccessError: tried to access field net.minecraft.client.gui.GuiIngame.overlayMessage from class micdoodle8.mods.galacticraft.core.tick.TickHandlerClient
    at micdoodle8.mods.galacticraft.core.tick.TickHandlerClient.onPreGuiRender(TickHandlerClient.java:327)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_55_TickHandlerClient_onPreGuiRender_Pre.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185)
    at net.minecraftforge.client.GuiIngameForge.pre(GuiIngameForge.java:885)
    at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:117)
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1142)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1140)
    at net.minecraft.client.Minecraft.run(Minecraft.java:407)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:26)

    I don't have this problem in the real 107 so right now I do my testing in an exported version of my mod.
     
  4. radfast

    radfast Administrator
    Staff Member

    Joined:
    Apr 27, 2014
    Messages:
    1,146
    Likes Received:
    354
    OK, sorry, strange coincidence that two different developers asked a question about IEntityBreathable on the same day!

    It sounds like you have not configured your Forge modding workspace with the access transformers. You have to do that before starting. It should be possible to update your workspace now by letting ForgeGradle de-compile Minecraft again with the access transformers, takes around 10-15 minutes.

    Instructions are here: https://wiki.micdoodle8.com/wiki/GC3_API#Full_Galacticraft_Sources
    You'll need to adapt that to 1.11.2. Our main 1.11.2 access transformer is here but please also check the resources in our dependencies folder, NEI doesn't exist in 1.11.2 but I suggest use it's access transformer just in case, as our code was originally made with that present - we should have copied everything needed from that into our own access transformer but we might have missed something, so it can't do any harm.
     
  5. SpikybumJolteon

    Joined:
    Jun 3, 2017
    Messages:
    5
    Likes Received:
    0
    Thanks! I finally had some time to look into this. I followed that access transformers bit and it all seems to work just fine now.
     
  6. SpikybumJolteon

    Joined:
    Jun 3, 2017
    Messages:
    5
    Likes Received:
    0
    I don't know if its considered wrong to continue posting to this particular page, but I think it is an API set up problem I'm having again. My laptop failed so I lost my working environment and I cannot remember how to properly set it up again.

    I seem to have everything set up far enough to get to exporting my mod with "gradlew build" but I get an error:
    [​IMG]

    I figured I'd show this before going to the effort of showing every thing I have done or tried follow. Perhaps someone would know right away where I went wrong.
     
  7. radfast

    radfast Administrator
    Staff Member

    Joined:
    Apr 27, 2014
    Messages:
    1,146
    Likes Received:
    354
    You need to do 1 of these 2 things:

    * add GalacticraftCore or just the Galacticraft API as a "library" in your development environment

    or:

    * add the full Galacticraft sources alongside your own source code in your development environment (needs the access transformers to be set up first)
     
  8. SpikybumJolteon

    Joined:
    Jun 3, 2017
    Messages:
    5
    Likes Received:
    0
    Hmm... apparently renaming the folder the Dev Jars are in to "libs" fixed the compilation problem. So it sees to work now!

    I wish tutorials wouldn't say give that folder any name.
     

Share This Page