As by title, i have an entity that acts like a snowball (so it's throwable) but is not rendering when fired. This is how i register the rendering in my client proxy
RenderingRegistry.registerEntityRenderingHandler(EntityGranade.class, new EntityGranadeFactory());
//The Entity Class
public class EntityGranade extends EntityThrowable
{
private EntityLivingBase thrower;
public EntityGranade(World worldIn)
{
super(worldIn);
}
public EntityGranade(World worldIn, EntityLivingBase throwerIn)
{
super(worldIn, throwerIn);
this.thrower = throwerIn;
}
@SideOnly(Side.CLIENT)
public EntityGranade(World worldIn, double x, double y, double z)
{
super(worldIn, x, y, z);
}
protected void onImpact(RayTraceResult result)
{
if(this.getThrower() != null && this.getThrower() instanceof EntityPlayerMP) {
EntityPlayerMP player = (EntityPlayerMP)this.getThrower();
if(player.connection.getNetworkManager().isChannelOpen() && player.world == this.world) {
EntityTNTPrimed tnt = new EntityTNTPrimed(player.world);
tnt.world.createExplosion(tnt, this.posX, this.posY, this.posZ, 2.0F, true);
}
}
this.setDead();
}
}
//The Factory Class
public class EntityGranadeFactory implements IRenderFactory<EntityGranade>{
@Override
public Render<? super EntityGranade> createRenderFor(RenderManager manager) {
return new RenderSnowball<EntityGranade>(manager, MWItems.GRANADE, Minecraft.getMinecraft().getRenderItem());
}
}
I have other things registerd like this (like custom TNT) and they all works as well, is just this that is not rendering. So why this happen and how can be fixed?