Jump to content

Recommended Posts

Posted

Hi, I have a custom entity, and I cant figure out how to register the renders for it. I see the way it works has changed a lot in 1.11. I really don't know how to approach this. Any help is appreciated, thanks!

Posted

Hey I'm doing something similar.  I have a RenderFoo.java class and I used to do this in 1.10.2:


    public void worldLoad(Load event) {
        if (event.getWorld().isRemote) {
            RenderFoo render = new RenderFoo(Minecraft.getMinecraft().getRenderManager(), new ModelFoo(), 0.7F);
            Minecraft.getMinecraft().getRenderManager().entityRenderMap.put(Foo.class, render);
        }
    }

 

But now in 1.12 (I think this works for 1.11?):
        if (event.getSide().isClient()) {
            RenderingRegistry.registerEntityRenderingHandler(Foo.class, RenderFoo::new);
 

Inside of  public void preInit(FMLPreInitializationEvent event)

 

Posted
1 hour ago, zennyrpg said:

Hey I'm doing something similar.  I have a RenderFoo.java class and I used to do this in 1.10.2:


    public void worldLoad(Load event) {
        if (event.getWorld().isRemote) {
            RenderFoo render = new RenderFoo(Minecraft.getMinecraft().getRenderManager(), new ModelFoo(), 0.7F);
            Minecraft.getMinecraft().getRenderManager().entityRenderMap.put(Foo.class, render);
        }
    }

 

But now in 1.12 (I think this works for 1.11?):
        if (event.getSide().isClient()) {
            RenderingRegistry.registerEntityRenderingHandler(Foo.class, RenderFoo::new);
 

Inside of  public void preInit(FMLPreInitializationEvent event)

 

hmmm, I put that in my Main class under pre init event, it didn't work, should it go in either of the proxys?

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.