Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.11.2] Help Registering Entity Renders


funsize888
 Share

Recommended Posts

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)

 

Link to comment
Share on other sites

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?

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.