TeNNoX Posted April 12, 2014 Share Posted April 12, 2014 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) Quote Link to comment Share on other sites More sharing options...
TLHPoE Posted April 13, 2014 Share Posted April 13, 2014 Full code please? Quote Kain Link to comment Share on other sites More sharing options...
TeNNoX Posted April 14, 2014 Author Share Posted April 14, 2014 Full code please? GuiHandler: http://pastebin.com/xu3UPn72 ChannelHandler: http://pastebin.com/FKiTzKCt Registering: // GUI stuff // NetworkRegistry.INSTANCE.registerGuiHandler(this, new AssemblyGuiHandler()); // Network channels // channels = NetworkRegistry.INSTANCE.newChannel("Assembly", new ChannelHandler()); Quote Link to comment Share on other sites More sharing options...
sequituri Posted April 20, 2014 Share Posted April 20, 2014 Post code for IAssemblyPacket and PacketSorter, please. Quote -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img] Link to comment Share on other sites More sharing options...
TeNNoX Posted April 23, 2014 Author Share Posted April 23, 2014 Post code for IAssemblyPacket and PacketSorter, please. Thank you for replying. Both in here: http://pastebin.com/d90z3CzF Quote Link to comment Share on other sites More sharing options...
TeNNoX Posted April 26, 2014 Author Share Posted April 26, 2014 *bump* Quote Link to comment Share on other sites More sharing options...
sequituri Posted April 26, 2014 Share Posted April 26, 2014 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). Quote -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img] Link to comment Share on other sites More sharing options...
TeNNoX Posted April 26, 2014 Author Share Posted April 26, 2014 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.