    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import org.lwjgl.opengl.GL11;
    006
    007    @SideOnly(Side.CLIENT)
    008    public class RenderWolf extends RenderLiving
    009    {
    010        public RenderWolf(ModelBase par1ModelBase, ModelBase par2ModelBase, float par3)
    011        {
    012            super(par1ModelBase, par3);
    013            this.setRenderPassModel(par2ModelBase);
    014        }
    015
    016        protected float getTailRotation(EntityWolf par1EntityWolf, float par2)
    017        {
    018            return par1EntityWolf.getTailRotation();
    019        }
    020
    021        protected int func_82447_a(EntityWolf par1EntityWolf, int par2, float par3)
    022        {
    023            float var4;
    024
    025            if (par2 == 0 && par1EntityWolf.getWolfShaking())
    026            {
    027                var4 = par1EntityWolf.getBrightness(par3) * par1EntityWolf.getShadingWhileShaking(par3);
    028                this.loadTexture(par1EntityWolf.getTexture());
    029                GL11.glColor3f(var4, var4, var4);
    030                return 1;
    031            }
    032            else if (par2 == 1 && par1EntityWolf.isTamed())
    033            {
    034                this.loadTexture("/mob/wolf_collar.png");
    035                var4 = 1.0F;
    036                int var5 = par1EntityWolf.func_82186_bH();
    037                GL11.glColor3f(var4 * EntitySheep.fleeceColorTable[var5][0], var4 * EntitySheep.fleeceColorTable[var5][1], var4 * EntitySheep.fleeceColorTable[var5][2]);
    038                return 1;
    039            }
    040            else
    041            {
    042                return -1;
    043            }
    044        }
    045
    046        /**
    047         * Queries whether should render the specified pass or not.
    048         */
    049        protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
    050        {
    051            return this.func_82447_a((EntityWolf)par1EntityLiving, par2, par3);
    052        }
    053
    054        /**
    055         * Defines what float the third param in setRotationAngles of ModelBase is
    056         */
    057        protected float handleRotationFloat(EntityLiving par1EntityLiving, float par2)
    058        {
    059            return this.getTailRotation((EntityWolf)par1EntityLiving, par2);
    060        }
    061    }