Jump to content

[1.7.10] Crash on server start-up due to custom packets


M4thG33k

Recommended Posts

Greetings! I've received this crash report from someone who's been using my mod and I can't seem to pinpoint the actual source of the crash: http://pastebin.com/YQ91FgMM

 

From my understanding, the crash is happening when Forge is attempting to register my packet classes. The interesting thing is, this crash just recently appeared. I was fixing other bugs that were found, and then this crash crept in, which I find extremely odd. If there are any ideas as to what the problem could be (besides "you're attempting to use client-only classes on the server" since I can see that much), I would appreciate it.

 

Here's the line that I can trace back to from the crash report that is apparently causing the issue: https://goo.gl/fDL8OZ

 

Thanks in advance!

Able to differentiate the difference of a sum and an integral.

Link to comment
Share on other sites

Would it be possible for you to tell me which client-only classes I'm using? I know I'm using EntityFX in my code, but I thought that I was providing enough checks to make sure that all of that code is only being run on the client side. I suppose I'm still not fully understanding how packets are supposed to work (despite reading quite a few tutorials)...

Able to differentiate the difference of a sum and an integral.

Link to comment
Share on other sites

Ok, so is there a "proper way" to have the packet handler get a Minecraft world instance, then? I can't pass it in to the packet at all, but the packet should know what world it ends up in, right?

Able to differentiate the difference of a sum and an integral.

Link to comment
Share on other sites

Get world via proxy.

 

In Common:

public World getClientWorld() { return null; }

In Client:

public World getClientWorld() {return Minecraft.getMinecraft().theWorld; }

 

EDIT

Dammit, he was faster :D

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

Link to comment
Share on other sites

All right, thanks to both of you! This makes perfect sense (even before seeing Ernio's code haha). I will attempt to put this into practice soon. Thanks for the quick responses!

Able to differentiate the difference of a sum and an integral.

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.