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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When you name a method like that, with no return value, it is a constructor. The constructor must have the same name as the class it constructs, in this case, ModItems. I would strongly advise reading up on some basic Java tutorials, because you will definitely be running into a lot more issues as you go along without the basics. *I should also add that the Forge documentation is a reference, not a tutorial. Even following tutorials, you should know Java basics, otherwise the smallest of mistakes will trip you up as you copy someone elses code.
    • so, I'm starting modding and I'm following the official documantation for forge: https://docs.minecraftforge.net, but in the registries part it is not working as it is in the docs:   public class ModItems { private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, DarkStarvation.MOD_ID); public static final RegistryObject<Item> TEST_ITEM = ITEMS.register("test_item", () -> new Item(new Item.Properties())); public DarkStarvation(FMLJavaModLoadingContext context) { ITEMS.register(context.getModEventBus()); } } in 'public DarkStarvation(...' the DarkStarvation has this error: Invalid method declaration; return type required and the getModEventBus(): Cannot resolve method 'getModEventBus' in 'FMLJavaModLoadingContext' please help, I asked gpt but it is saying that I'm using an old method, but I'm following the latest version of Forge Docs???
    • I merged your second post with the original , there is no need to post a new thread asking for an answer. If someone sees your post and can help, they will reply. If you are seeking a quicker response, you could try asking in the Minecraft Forge diacord.
    • Create a new instance and start with cobblemon - if this works, add the rest of your mods in groups   Maybe another mod is conflicting - like Sodium/Iris or Radical Cobblemon Trainers
    • https://forums.minecraftforge.net/topic/157393-1201-forge-rocket-flame-particle-trail-moves-up-and-crashes-into-the-rocket-during-flight/#comment-584134
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.