Jump to content

[1.7.10] Never-called code crashing (packets).


Ernio

Recommended Posts

It's not like I can't deal with it, just wondering if the code is 100% not called somewhere where I don't want it to.

 

So this part:

instance.registerMessage(PacketOpenIntroductionGui.class, PacketOpenIntroductionGui.class, 100, Side.CLIENT);

Specifically defines (concluded from documentation) that RECEIVER IS CLIENT.

 

Why does this:

public class PacketOpenIntroductionGui implements IMessage, IMessageHandler<PacketOpenIntroductionGui, IMessage>
{
...whole this "needed" stuff.

@Override
public IMessage onMessage(PacketOpenIntroductionGui message, MessageContext ctx)
{
	System.out.println("RECEIVED");
	Minecraft.getMinecraft().displayGuiScreen(new GuiIntroduction());
	return null;
}
}

 

Crash when I run dedicated server pointing out NoClassDef? (There is no Minecraft on sever, i know that)

Note: On dedic there is NO print "RECEIVED" so I assumed it's not called.

 

What am I missing?

 

EDIT:

Turns out I can't deal with it:

Side side = FMLCommonHandler.instance().getEffectiveSide();        
	if (side == Side.CLIENT)
	{
		System.out.println("INTRODUCTION");
		Minecraft.getMinecraft().displayGuiScreen(new GuiIntroduction());
	}

Still gives me crash NoClassDef.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

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.