IRenderFactory help in Minecraft Forge
<p>I've been having trouble with the new syntax for entity registry, specifically rendering the entity. Before, you simply added the <code>RenderingRegistry.registerEntityRenderingHandler</code> line to your <code>ClientProxy</code>, and that was that. But now, it's asking me to use <code>RenderingRegistry.registerEntityRenderingHandler</code> in the <code>preInit</code> along with a parameter called <code>IRenderFactory</code>. I'm not really sure how <code>IRenderFactory</code> works, or how I can create one (if I need to).</p>
<p>I've been told that you can use a method reference to pass your Render class's constructor (<code>RenderMyEntity::new</code>) as an <code>IRenderFactory</code> instead, but I really don't know how to go about this. I've done all kinds of research, but none of it makes sense.</p>
<p>Here's my <code>MobExample</code> class (the line <code>RenderingRegistry.registerEntityRenderingHandler(RenderGelZombie.class, renderFactory)</code> only works in the <code>preInit</code> of <code>MobExample</code> class, which is why it's there and not in <code>ClientProxy</code>):</p>
<pre><code>package com.aideux.mobexample;

import com.aideux.basemod.BaseMod;

import net.minecraft.client.model.ModelZombie;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class MobExample 
{
public static int currentEntityId = 0;

public static void preInit()
{
    createEntityWithEgg(EntityGelZombie.class, &quot;CustomMob&quot;, 0x00FF00, 0xFF0000);
    RenderingRegistry.registerEntityRenderingHandler(RenderGelZombie.class, renderFactory);
}

public static void init()
{
    BaseMod.proxy.registerEntityRenderers();
}

public static void createEntityWithEgg(Class entityClass, String entityName, int solidColor, int spotColor)
{
    int entityId = currentEntityId++;
    EntityRegistry.registerModEntity(entityClass, entityName, entityId, BaseMod.instance, 250, 1, true, solidColor, spotColor);
}
}
</code></pre>