Jump to content

Recommended Posts

Posted

Hey!

I've been having a problem with my code that, after about 5 hours of messing with stuff, has caused me to turn to you, the all knowing community, for help. That being said here is my problem:

I try and spawn in one of the 3 biped entities in my mod and I get an error like this:

http://chopapp.com/#vjfmu1ia

 

The full log is here:

 

  Reveal hidden contents

 

And the files are here:

https://github.com/KaminoCoding/CommuMod/tree/develop-1.8/src/main/java/io/cyb3rwarri0r8/commumod

 

https://github.com/KaminoCoding/CommuMod/blob/develop-1.8/src/main/java/io/cyb3rwarri0r8/commumod/entity/EntityMiner.java

https://github.com/KaminoCoding/CommuMod/blob/develop-1.8/src/main/java/io/cyb3rwarri0r8/commumod/entity/ModEntities.java

https://github.com/KaminoCoding/CommuMod/blob/develop-1.8/src/main/java/io/cyb3rwarri0r8/commumod/entity/render/renderMiner.java

https://github.com/KaminoCoding/CommuMod/blob/develop-1.8/src/main/java/io/cyb3rwarri0r8/commumod/lib/helpers/RegisterHelper.java

Posted
  On 1/26/2016 at 1:37 AM, diesieben07 said:

First of all, please for the love of god do not use global Entity IDs. Especially if you then use registerModEntity. Start your IDs at 0 and increment.

Ahh. Okay. Deep down I thought this was wrong but it was followed from a tutorial way back when 1.8 FML was first pushed out.

  Quote

The issue is that entity renderers must be registered in init, not preInit. You have one that is registered in preInit as opposed to the rest. You should update to 1.8.9 anyways and use the new IRenderFactory, possibly in conjunction with a Constructor Reference, so you would have

registerEntityRenderingHandler(MyEntity.class, MyRenderer::new)

, this can (and should) then be used in preInit.

 

Will do. I've been waiting for it to become the stable/recommended/most used channel(idk what to call it... the default one everyone is using I guess).

Posted

Be aware, however, that if you do use a Constructor Reference as suggested, your mod will require Java 8 to run. I recently released an update to one of my mods and compiled it with Java 7 compatibility by accident and had several people report crashes - they were still using Java 6...

 

Don't let that stop you, though. People should really update their Java installations, but it's worth noting.

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.