MCTCP / TerrainControl

Minecraft Terrain Generator for SpigotMC and Forge
https://www.spigotmc.org/threads/terraincontrol.37980/
MIT License
230 stars 163 forks source link

java.lang.NoClassDefFoundError when using with mod packs #506

Closed DevNebulae closed 7 years ago

DevNebulae commented 7 years ago

How to reproduce

Error log

---- Minecraft Crash Report ----
// Oops.

Time: 1/15/17 8:24 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 TerrainControl (terraincontrol)
Caused by: java.lang.NoClassDefFoundError: jline/internal/Preconditions
    at com.khorn.terraincontrol.forge.events.PlayerTracker.<init>(PlayerTracker.java:31)
    at com.khorn.terraincontrol.forge.TCPlugin.load(TCPlugin.java:76)
    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:600)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:795)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:324)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:520)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    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)
Caused by: java.lang.ClassNotFoundException: jline.internal.Preconditions
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 39 more
Caused by: java.lang.NullPointerException
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    ... 41 more

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.10.2
    Operating System: Linux (amd64) version 4.4.0-45-generic
    Java Version: 1.8.0_111, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 531693416 bytes (507 MB) / 1475870720 bytes (1407 MB) up to 7635730432 bytes (7282 MB)
    JVM Flags: 2 total; -Xms256M -Xmx8192M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.32 Powered by Forge 12.18.3.2185 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHI    mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI    FML{8.0.99.99} [Forge Mod Loader] (forge-1.10.2-12.18.3.2185-universal.jar) 
    UCHI    Forge{12.18.3.2185} [Minecraft Forge] (forge-1.10.2-12.18.3.2185-universal.jar) 
    UCHE    terraincontrol{2.8.2-SNAPSHOT} [TerrainControl] (terraincontrol-forge-2.8.2-1.10.2-B1.jar) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 367.57' Renderer: 'GeForce GTX 760/PCIe/SSE2'
parlough commented 7 years ago

For some reason it is trying to use jline's internal Preconditions which is not present on the client, instead of Guava's which is what is imported and used as a dependency. Not exactly sure why this is happening but I'll try to figure it out.

parlough commented 7 years ago

I made a pull request to blood's 1.10.2 branch here: https://github.com/bloodmc/TerrainControl/pull/1

Once that gets merged a version compiled from there should work.

parlough commented 7 years ago

If anyone else has this issue the latest version of blood's 1.10.2 fork should be good to compile without this issue. You can find the 1.10.2 branch here: https://github.com/bloodmc/TerrainControl/tree/1.10.2

rutgerkok commented 7 years ago

The Forge version is more or less taken over by @PG85 - see his fork called OpenTerrainGen. I don't think this will be fixed by me.