    001    package net.minecraft.client.renderer.entity;
    002
    003    import cpw.mods.fml.relauncher.Side;
    004    import cpw.mods.fml.relauncher.SideOnly;
    005    import net.minecraft.client.model.ModelBase;
    006    import net.minecraft.entity.EntityLiving;
    007    import net.minecraft.entity.passive.EntitySheep;
    008    import org.lwjgl.opengl.GL11;
    009
    010    @SideOnly(Side.CLIENT)
    011    public 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 var4 = 1.0F;
    025                int var5 = par1EntitySheep.getFleeceColor();
    026                GL11.glColor3f(var4 * EntitySheep.fleeceColorTable[var5][0], var4 * EntitySheep.fleeceColorTable[var5][1], var4 * EntitySheep.fleeceColorTable[var5][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    }