package client.renderer.entity;

import org.lwjgl.opengl.GL11;

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


public class RenderCat extends RenderLiving<EntityCat>
{
    private static final String TEXTURE_BLACK = "textures/creature/cat_black.png";
    private static final String TEXTURE_WILD = "textures/creature/cat_wild.png";
    private static final String TEXTURE_RED = "textures/creature/cat_red.png";
    private static final String TEXTURE_SIAMESE = "textures/creature/cat_siamese.png";

    public RenderCat(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(EntityCat entity)
    {
        switch (entity.getTameSkin())
        {
            case 0:
            default:
                return TEXTURE_WILD;

            case 1:
                return TEXTURE_BLACK;

            case 2:
                return TEXTURE_RED;

            case 3:
                return TEXTURE_SIAMESE;
        }
    }

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

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