Server will not work with my mod. Is there a fix?

Started by EnvyingGolem47 on Wed, 08/16/2017 - 18:20

Topic category: Help with MCreator's application

Last seen on 17:14, 23. Mar 2019
Joined Feb 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Server will not work with my mod. Is there a fix?
Wed, 08/16/2017 - 18:20

So, I tried both my dedicated server and the server test enviroment both failed and gave me this error:

cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP

After some research on other sources aka the minecraft forums I learned that this happens when the mod is only avaliable client side. I was wondering if there was any code I could edit or just any fix really. Any info on how to fix will be greatly appreciated! Thank you!

-EnvyingGolem47
 

 

 

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
You have to get rid of every
Wed, 08/16/2017 - 18:57

You have to get rid of every use of client-only code (So instances of client only classes, calling client only methods, using client only fields and so on) from common/server side code. By that, I do not mean deleting the code, but using correct alternatives, so, for example, do not use Minecraft#thePlayer for getting the player instance, but use for example from a parameter of a method, or even iterate through all players if you for some unknown reason have to. Also, most of these "client only classes" are relicts from pre 1.3 age, when client and server were separate. Usually, these classes extend some class that is common for both sides so try parse to it, however, I do not know your code so I can not be more exact.