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.gui.inventory.GuiContainer

Featured Replies

Posted

I got this wierd error (probably) after sending a normal packet from clicking something in the gui to the server.

line 48: "There was a critical exception handling a packet on channel Assembly"

 

http://pastebin.com/A28vLvct

 

Packet sending code:

Assembly.instance.channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);
Assembly.instance.channels.get(Side.CLIENT).writeOutbound(new PacketSorter(this));

 

The error only occurs on the server (not when playing in singleplayer)

From the looks of the error log and your packet class, it seems that netty is trying to create your server side packet when it encounters a CNF error searching through your constructors. One of your constructors requires a GuiAssemblySorter instance... that is where the error comes in, as this class does not exist server side as far as I can tell.

Why not try and put a @SideOnly(Side.CLIENT) annotation on that specific constructor. It may fix it because then it would not find that constructor on the server side (which it correctly should not).

  • Author

From the looks of the error log and your packet class, it seems that netty is trying to create your server side packet when it encounters a CNF error searching through your constructors. One of your constructors requires a GuiAssemblySorter instance... that is where the error comes in, as this class does not exist server side as far as I can tell.

Why not try and put a @SideOnly(Side.CLIENT) annotation on that specific constructor. It may fix it because then it would not find that constructor on the server side (which it correctly should not).

 

You're right, I had those two constructors in PacketSorter, and the SideOnly annotation fixed it:

public PacketSorter() {
}

@SideOnly(Side.CLIENT)
public PacketSorter(GuiAssemblySorter gui) {
active = gui.active;
x = gui.tile.xCoord;
y = gui.tile.yCoord;
z = gui.tile.zCoord;
}

 

Thank you <3

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.