Jump to content

[SOLVED] Server side crash, java.lang.NoClassDefFoundError: mymod/myGui


Recommended Posts

Posted

Hello,

 

in my mod the Client side work fine, but Server side crash when try to open a gui, the error:

 

 

  Reveal hidden contents

 

 

 

Follow the line 189 in "my_item" file:

 

 

  Reveal hidden contents

 

 

 

And this is the code of "myGuiHandler" file:

 

 

  Reveal hidden contents

 

 

 

The "myGui" file is a normal GUIScreen class object.

 

 

Please i need HELP!!!

 

-----------

 

Solution (thanks to diesieben07 and opssemnik):

 

just using EntityPlayer.opengui(mod obj, gui id, x,y,z) function

 

Thanks

Posted

Ok,

 

thank you for reply.

 

I've replace the line 189 with this:

 

par3EntityPlayer.openGui(mymod.instance, 1, par2World, (int)par3EntityPlayer.posX, (int)par3EntityPlayer.posY, (int)par3EntityPlayer.posZ);

 

But when i try to open the gui:

 

"A mod tried to open a gui on the server without being a NetworkMod"

 

my mod has 3 different gui classes but i dont know how to declare or refer the IDs

 

Into main class file it's declared this:

 

@NetworkMod(

clientSideRequired = true,

serverSideRequired = false,

channels = {"MyMod"},

packetHandler = ServerPacketHandler.class

)

 

Any suggestion?

 

 

Posted

What about your proxy classes?

Do you have commonProxy and clientProxy?

I'm going to assume that you're server is calling a client only method, that's why it is crashing!

The server should never handle client side things :)

 

Take a look at:

http://www.minecraftforge.net/wiki/Basic_Modding

It will help you setup the CommonProxy and ClientProxy files correctly.

While http://www.minecraftforge.net/wiki/Containers_and_GUIs may give you some more help inn calling the GUI and such.

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted

Yes, i've both ClientProxy and CommonProxy. I literally followed any mod guide line.

 

And my 3 GUI aren't container GUI.

 

But the error still happen.

 

There must be something wrong into the @NetworkMod declaration.

 

This my main mod class code:

 

 

  Reveal hidden contents

 

 

Proxies:

 

  Reveal hidden contents

 

 

And This is GuiHandler code:

 

 

  Reveal hidden contents

 

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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