    001package net.minecraft.client.renderer.entity;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import net.minecraft.client.model.ModelBase;
    006import net.minecraft.entity.EntityLiving;
    007import net.minecraft.entity.passive.EntitySheep;
    008import org.lwjgl.opengl.GL11;
    009
    010@SideOnly(Side.CLIENT)
    011public class RenderSheep extends RenderLiving
    012{
    013    public RenderSheep(ModelBase par1ModelBase, ModelBase par2ModelBase, float par3)
    014    {
    015        super(par1ModelBase, par3);
    016        this.setRenderPassModel(par2ModelBase);
    017    }
    018
    019    protected int setWoolColorAndRender(EntitySheep par1EntitySheep, int par2, float par3)
    020    {
    021        if (par2 == 0 && !par1EntitySheep.getSheared())
    022        {
    023            this.loadTexture("/mob/sheep_fur.png");
    024            float f1 = 1.0F;
    025            int j = par1EntitySheep.getFleeceColor();
    026            GL11.glColor3f(f1 * EntitySheep.fleeceColorTable[j][0], f1 * EntitySheep.fleeceColorTable[j][1], f1 * EntitySheep.fleeceColorTable[j][2]);
    027            return 1;
    028        }
    029        else
    030        {
    031            return -1;
    032        }
    033    }
    034
    035    /**
    036     * Queries whether should render the specified pass or not.
    037     */
    038    protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
    039    {
    040        return this.setWoolColorAndRender((EntitySheep)par1EntityLiving, par2, par3);
    041    }
    042}