    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 ModelWitch extends ModelVillager
    008    {
    009        public boolean field_82900_g = false;
    010        private ModelRenderer field_82901_h = (new ModelRenderer(this)).setTextureSize(64, 128);
    011        private ModelRenderer field_82902_i;
    012
    013        public ModelWitch(float par1)
    014        {
    015            super(par1, 0.0F, 64, 128);
    016            this.field_82901_h.setRotationPoint(0.0F, -2.0F, 0.0F);
    017            this.field_82901_h.setTextureOffset(0, 0).addBox(0.0F, 3.0F, -6.75F, 1, 1, 1, -0.25F);
    018            this.field_82898_f.addChild(this.field_82901_h);
    019            this.field_82902_i = (new ModelRenderer(this)).setTextureSize(64, 128);
    020            this.field_82902_i.setRotationPoint(-5.0F, -10.03125F, -5.0F);
    021            this.field_82902_i.setTextureOffset(0, 64).addBox(0.0F, 0.0F, 0.0F, 10, 2, 10);
    022            this.villagerHead.addChild(this.field_82902_i);
    023            ModelRenderer var2 = (new ModelRenderer(this)).setTextureSize(64, 128);
    024            var2.setRotationPoint(1.75F, -4.0F, 2.0F);
    025            var2.setTextureOffset(0, 76).addBox(0.0F, 0.0F, 0.0F, 7, 4, 7);
    026            var2.rotateAngleX = -0.05235988F;
    027            var2.rotateAngleZ = 0.02617994F;
    028            this.field_82902_i.addChild(var2);
    029            ModelRenderer var3 = (new ModelRenderer(this)).setTextureSize(64, 128);
    030            var3.setRotationPoint(1.75F, -4.0F, 2.0F);
    031            var3.setTextureOffset(0, 87).addBox(0.0F, 0.0F, 0.0F, 4, 4, 4);
    032            var3.rotateAngleX = -0.10471976F;
    033            var3.rotateAngleZ = 0.05235988F;
    034            var2.addChild(var3);
    035            ModelRenderer var4 = (new ModelRenderer(this)).setTextureSize(64, 128);
    036            var4.setRotationPoint(1.75F, -2.0F, 2.0F);
    037            var4.setTextureOffset(0, 95).addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.25F);
    038            var4.rotateAngleX = -0.20943952F;
    039            var4.rotateAngleZ = 0.10471976F;
    040            var3.addChild(var4);
    041        }
    042
    043        /**
    044         * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
    045         * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
    046         * "far" arms and legs can swing at most.
    047         */
    048        public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
    049        {
    050            super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
    051            this.field_82898_f.field_82906_o = this.field_82898_f.field_82908_p = this.field_82898_f.field_82907_q = 0.0F;
    052            float var8 = 0.01F * (float)(par7Entity.entityId % 10);
    053            this.field_82898_f.rotateAngleX = MathHelper.sin((float)par7Entity.ticksExisted * var8) * 4.5F * (float)Math.PI / 180.0F;
    054            this.field_82898_f.rotateAngleY = 0.0F;
    055            this.field_82898_f.rotateAngleZ = MathHelper.cos((float)par7Entity.ticksExisted * var8) * 2.5F * (float)Math.PI / 180.0F;
    056
    057            if (this.field_82900_g)
    058            {
    059                this.field_82898_f.rotateAngleX = -0.9F;
    060                this.field_82898_f.field_82907_q = -0.09375F;
    061                this.field_82898_f.field_82908_p = 0.1875F;
    062            }
    063        }
    064
    065        public int func_82899_a()
    066        {
    067            return 0;
    068        }
    069    }