    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005
    006    @SideOnly(Side.CLIENT)
    007    public class ModelSkeletonHead extends ModelBase
    008    {
    009        public ModelRenderer field_82896_a;
    010
    011        public ModelSkeletonHead()
    012        {
    013            this(0, 35, 64, 64);
    014        }
    015
    016        public ModelSkeletonHead(int par1, int par2, int par3, int par4)
    017        {
    018            this.textureWidth = par3;
    019            this.textureHeight = par4;
    020            this.field_82896_a = new ModelRenderer(this, par1, par2);
    021            this.field_82896_a.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
    022            this.field_82896_a.setRotationPoint(0.0F, 0.0F, 0.0F);
    023        }
    024
    025        /**
    026         * Sets the models various rotation angles then renders the model.
    027         */
    028        public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
    029        {
    030            this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
    031            this.field_82896_a.render(par7);
    032        }
    033
    034        /**
    035         * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
    036         * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
    037         * "far" arms and legs can swing at most.
    038         */
    039        public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
    040        {
    041            super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
    042            this.field_82896_a.rotateAngleY = par4 / (180F / (float)Math.PI);
    043            this.field_82896_a.rotateAngleX = par5 / (180F / (float)Math.PI);
    044        }
    045    }