Posted October 19, 201212 yr Well, I have a nasty problem. From Eclipse and go to Run -> Server the Minecraft Server opens, but it prints out the following error: [sEVERE] Encountered an unexpected exception NoClassDefFoundError java.lang.NoClassDefFoundError: net/minecraft/src/WorldClient at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:305) at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:255) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:349) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81) at cpw.mods.fml.common.Loader.loadMods(Loader.java:458) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:80) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:352) at net.minecraft.src.DedicatedServer.startServer(DedicatedServer.java:49) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:415) at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:17) Caused by: java.lang.ClassNotFoundException: net.minecraft.src.WorldClient at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 31 more Caused by: java.lang.NullPointerException at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119) ... 33 more And it fails to run. I'm sure it's a problem from my mod, but I have no idea how to fix it. Any help is appriciated, thanks in advance! P.S.: This also happens if I decompile, reobfuscate and put it on a normal server.
October 20, 201212 yr You have a hard reference to a client only class, namely WorldClient, remove that hard reference... I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 20, 201212 yr Author You have a hard reference to a client only class, namely WorldClient, remove that hard reference... Well, I searched around all files from project Minecraft and the only place I found "WorldClient" was on line 29 at cpw.mods.fml.common.modloader.BaseModProxy: import net.minecraft.src.WorldClient; Where else could this thing be?
October 20, 201212 yr Its referenced in your mod somewhere. You'll have to find it, we're not gunna dig around your code telepathically for you.. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 20, 201212 yr Author Its referenced in your mod somewhere. You'll have to find it, we're not gunna dig around your code telepathically for you.. Strange, but right after I ran a global search for the class, the problem fixed itself and then I just needed to play around with ModLoader.addArmor(); to make it work and the server is okay. Or at least the test server only... I will see about the real one. But thanks anyways.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.