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                GL11.glColor3f(var4, var4, var4);
029                return 1;
030            }
031            else if (par2 == 1 && par1EntityWolf.isTamed())
032            {
033                this.loadTexture("/mob/wolf_collar.png");
034                var4 = 1.0F;
035                int var5 = par1EntityWolf.func_82186_bH();
036                GL11.glColor3f(var4 * EntitySheep.fleeceColorTable[var5][0], var4 * EntitySheep.fleeceColorTable[var5][1], var4 * EntitySheep.fleeceColorTable[var5][2]);
037                return 1;
038            }
039            else
040            {
041                return -1;
042            }
043        }
044    
045        /**
046         * Queries whether should render the specified pass or not.
047         */
048        protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
049        {
050            return this.func_82447_a((EntityWolf)par1EntityLiving, par2, par3);
051        }
052    
053        /**
054         * Defines what float the third param in setRotationAngles of ModelBase is
055         */
056        protected float handleRotationFloat(EntityLiving par1EntityLiving, float par2)
057        {
058            return this.getTailRotation((EntityWolf)par1EntityLiving, par2);
059        }
060    }