Jump to content

Recommended Posts

Posted

I followed a combo of these two tutorials and some general reading, plus previous experience.

 

http://www.minecraftforge.net/forum/index.php/topic,20135.0.html]]http://www.minecraftforge.net/forum/index.php/topic,20135.0.html '>

https://gist.github.com/CatDany/4a3df7fcb3c8270cf70b

 

I'm pretty stumped right now.  Any Help would be appreciated.

 

I'm getting a crash in the SimpleNetworkWrapper.  Log isn't much help on this one but i traced the error in debug to the following spoiler section.  I'm going to admit I don't get what that section of code does 100%.  however, it fails when it gets to the "return handler.newInstance();" portion.  If i check the newInstance and try to go to it in Eclipse, I get "Source not Found".  I'm using 1.7.  Can see all other source, not sure what the issue is with that.  Perhaps I'm missing something in the setup?

 

 

 

 

Main Class Call in PreInit

 

 

 

PacketHandler

 

  Reveal hidden contents

 

 

I tried commenting out the first line in "registerMessage" just to make sure the side didn't make a difference.  It didn't.

 

Faction_List (this is the first one and the one it fails on)

 

  Reveal hidden contents

 

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

I tried that, made no difference.  Besides in a conversation between diesieben07 and coolAlias it was clearly stated that you could.  Dany's example shows it as well. 

 

Here is the crash log

 

 

  Reveal hidden contents

 

 

As mentioned, it doesn't show much of use.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

That did it.  Thanks.

 

Would you mind explaining to me why Minecraft can't handle it without it being static?

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

I haven't played much with nested classes.

 

So if it wasn't nested, then i wouldn't have the issue?

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

Thats where static comes into play. It means that every instance is sharing this attribute (in this case the class), which means that u can access it without instance, because its the same for every instance

Posted

Ah, got it now.  Thanks.  I've always been a bit confused by static references but now its clear. 

Long time Bukkit & Forge Programmer

Happy to try and help

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.