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.

java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityClientPlayer

Featured Replies

Posted

It was recently brought to my attention that my modification, PokemonMD: Undaunted Heroes, does not run on Multiplayer. The crash log: http://pastebin.com/N1Ug9UTT

 

Apparently, somewhere in my mod I'm trying to call a client side class/function on the server that does exist. I have no idea how to find out where this happening with the literal hundreds of classes my mod has.

 

What should I do? Is there a way to get it to tell me what class/function is trying to be called where?

Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP

    at java.lang.Class.forName0(Native Method)

    at java.lang.Class.forName(Unknown Source)

    at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59)

    at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512)

 

The error occurs when FML attempts to load your proxy class before creating an instance of it, so your server proxy is trying to use a client-only class.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

....so, post your proxy classes.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

And your main class, especially where it mentions/annotates your proxies.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

  • Author

The error occurs when FML attempts to load your proxy class before creating an instance of it, so your server proxy is trying to use a client-only class.

 

Alright, so check stuff in my server proxy?

 

I did have this function there:

 

public EntityPlayerMP getPlayerEntityFromContext(MessageContext ctx)

{

return (EntityPlayerMP) (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : ctx.getServerHandler().playerEntity);

}

 

A section of dead code on the server proxy I forgot to remove after I couldn't get a Jabelar tutorial to work on extending item reach. I removed it, exported the mod, and tried to start a server and it at least started up this time. I'll send a copy to my Beta tester to make sure there are not any unexpected consequences.

 

Thanks so much for helping me figure out where to look! That helped immensely.

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.