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