Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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

  • 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?

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

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.