package client.renderer.entity;

import org.lwjgl.opengl.GL11;

import client.renderer.model.ModelBase;
import common.entity.animal.EntityOcelot;


public class RenderOcelot extends RenderLiving<EntityOcelot>
{
    private static final String blackOcelotTextures = "textures/entity/cat_black.png";
    private static final String ocelotTextures = "textures/entity/cat_ocelot.png";
    private static final String redOcelotTextures = "textures/entity/cat_red.png";
    private static final String siameseOcelotTextures = "textures/entity/cat_siamese.png";

    public RenderOcelot(RenderManager renderManagerIn, ModelBase modelBaseIn)
    {
        super(renderManagerIn, modelBaseIn);
    }

    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected String getEntityTexture(EntityOcelot entity)
    {
        switch (entity.getTameSkin())
        {
            case 0:
            default:
                return ocelotTextures;

            case 1:
                return blackOcelotTextures;

            case 2:
                return redOcelotTextures;

            case 3:
                return siameseOcelotTextures;
        }
    }

    /**
     * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
     * entityLiving, partialTickTime
     */
    protected void preRenderCallback(EntityOcelot entitylivingbaseIn, float partialTickTime)
    {
        super.preRenderCallback(entitylivingbaseIn, partialTickTime);

        if (entitylivingbaseIn.isTamed())
        {
            GL11.glScalef(0.8F, 0.8F, 0.8F);
        }
    }
}
