Jump to content

[Solved] Server crash java.lang.NoClassDefFoundError: GUIScreen


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):

 

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

 

Thanks

Posted

Well,

 

I tried your method but still happen same error:

 

FMLCommonHandler.instance().showGuiScreen(new GuiHandler().getClientGuiElement(mymod.myGuiID1, par3EntityPlayer, par2World, (int)par3EntityPlayer.posX, (int)par3EntityPlayer.posY, (int)par3EntityPlayer.posZ));

 

Also I tried using FMLClientHandler:

 

FMLClientHandler.instance().showGuiScreen(new GuiHandler().getClientGuiElement(mymod.myGuiID1, par3EntityPlayer, par2World, (int)par3EntityPlayer.posX, (int)par3EntityPlayer.posY, (int)par3EntityPlayer.posZ));

 

Error: Exception in server tick loop

 

java.lang.NoClassDefFoundError: mymod/myGui1

at mymod.ClientProxy.openClientGui(ClientProxy.java:28)

 

 

This is the HandlerGui code:

 

 

  Reveal hidden contents

 

 

ClientProxy code:

 

 

  Reveal hidden contents

 

 

CommonProxy code:

 

 

  Reveal hidden contents

 

Posted

Sure, I also tried that.

 

But occurs another error:

 

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

 

And this wont work.

 

Into main mod class file it's declared this:

 

@NetworkMod(

clientSideRequired = true,

serverSideRequired = false,

channels = {"MyMod"},

packetHandler = ServerPacketHandler.class

)

 

Into my_item right_click event there was:

 

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

 

Please anyone can show me a working example of gui open on the server side???

:-\

 

 

 

Posted

this is my main mod class:

 

 

  Reveal hidden contents

 

 

GuiHandler class:

 

  Reveal hidden contents

 

 

Line into my_item right_click event:

 

  Reveal hidden contents

 

Posted

You are AWESOME!!!

 

my ModID into @instance("MyMod") was wrong!!!

 

Now the Gui is open but can't play the sound in it:

 

varWorld.playSoundEffect(var10 + 0.5D, var11 + 1.0D, var12 + 0.5D, "mob.blaze.death", 1.0F, 1.0F);

 

won't play...

 

Also the line into the Gui don't work anymore:

 

varWorld.setBlockWithNotify(X, Y, Z, mymod.myblockID);

 

???:o

 

Seems a server notify issue ...

 

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.