    001    package net.minecraft.client.model;
    002
    003    import cpw.mods.fml.relauncher.Side;
    004    import cpw.mods.fml.relauncher.SideOnly;
    005    import net.minecraft.entity.Entity;
    006    import net.minecraft.util.MathHelper;
    007
    008    @SideOnly(Side.CLIENT)
    009    public class ModelZombie extends ModelBiped
    010    {
    011        public ModelZombie()
    012        {
    013            this(0.0F, false);
    014        }
    015
    016        protected ModelZombie(float par1, float par2, int par3, int par4)
    017        {
    018            super(par1, par2, par3, par4);
    019        }
    020
    021        public ModelZombie(float par1, boolean par2)
    022        {
    023            super(par1, 0.0F, 64, par2 ? 32 : 64);
    024        }
    025
    026        /**
    027         * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
    028         * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
    029         * "far" arms and legs can swing at most.
    030         */
    031        public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
    032        {
    033            super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
    034            float var8 = MathHelper.sin(this.onGround * (float)Math.PI);
    035            float var9 = MathHelper.sin((1.0F - (1.0F - this.onGround) * (1.0F - this.onGround)) * (float)Math.PI);
    036            this.bipedRightArm.rotateAngleZ = 0.0F;
    037            this.bipedLeftArm.rotateAngleZ = 0.0F;
    038            this.bipedRightArm.rotateAngleY = -(0.1F - var8 * 0.6F);
    039            this.bipedLeftArm.rotateAngleY = 0.1F - var8 * 0.6F;
    040            this.bipedRightArm.rotateAngleX = -((float)Math.PI / 2F);
    041            this.bipedLeftArm.rotateAngleX = -((float)Math.PI / 2F);
    042            this.bipedRightArm.rotateAngleX -= var8 * 1.2F - var9 * 0.4F;
    043            this.bipedLeftArm.rotateAngleX -= var8 * 1.2F - var9 * 0.4F;
    044            this.bipedRightArm.rotateAngleZ += MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
    045            this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(par3 * 0.09F) * 0.05F + 0.05F;
    046            this.bipedRightArm.rotateAngleX += MathHelper.sin(par3 * 0.067F) * 0.05F;
    047            this.bipedLeftArm.rotateAngleX -= MathHelper.sin(par3 * 0.067F) * 0.05F;
    048        }
    049    }