/// <summary>
        /// Used to rotate the dragon as a whole in RenderDragon. It's called in the rotateCorpse method.
        /// </summary>
        protected virtual void RotateDragonBody(EntityDragon par1EntityDragon, float par2, float par3, float par4)
        {
            float f  = (float)par1EntityDragon.Func_40160_a(7, par4)[0];
            float f1 = (float)(par1EntityDragon.Func_40160_a(5, par4)[1] - par1EntityDragon.Func_40160_a(10, par4)[1]);

            //GL.Rotate(-f, 0.0F, 1.0F, 0.0F);
            //GL.Rotate(f1 * 10F, 1.0F, 0.0F, 0.0F);
            //GL.Translate(0.0F, 0.0F, 1.0F);

            if (par1EntityDragon.DeathTime > 0)
            {
                float f2 = ((((float)par1EntityDragon.DeathTime + par4) - 1.0F) / 20F) * 1.6F;
                f2 = MathHelper2.Sqrt_float(f2);

                if (f2 > 1.0F)
                {
                    f2 = 1.0F;
                }

                //GL.Rotate(f2 * GetDeathMaxRotation(par1EntityDragon), 0.0F, 0.0F, 1.0F);
            }
        }
        /// <summary>
        /// Sets the models various rotation angles then renders the model.
        /// </summary>
        public override void Render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
        {
            //GL.PushMatrix();
            EntityDragon entitydragon = (EntityDragon)par1Entity;
            float        f            = entitydragon.Field_40173_aw + (entitydragon.Field_40172_ax - entitydragon.Field_40173_aw) * Field_40317_s;

            Jaw.RotateAngleX = (float)(Math.Sin(f * (float)Math.PI * 2.0F) + 1.0D) * 0.2F;
            float f1 = (float)(Math.Sin(f * (float)Math.PI * 2.0F - 1.0F) + 1.0D);

            f1 = (f1 * f1 * 1.0F + f1 * 2.0F) * 0.05F;
            //GL.Translate(0.0F, f1 - 2.0F, -3F);
            //GL.Rotate(f1 * 2.0F, 1.0F, 0.0F, 0.0F);
            float f2 = -30F;
            float f4 = 0.0F;
            float f5 = 1.5F;

            float[] ad = entitydragon.Func_40160_a(6, Field_40317_s);
            float   f6 = UpdateRotations(entitydragon.Func_40160_a(5, Field_40317_s)[0] - entitydragon.Func_40160_a(10, Field_40317_s)[0]);
            float   f7 = UpdateRotations(entitydragon.Func_40160_a(5, Field_40317_s)[0] + (f6 / 2.0F));

            f2 += 2.0F;
            float f8 = f * (float)Math.PI * 2.0F;

            f2 = 20F;
            float f3 = -12F;

            for (int i = 0; i < 5; i++)
            {
                float[] ad3 = entitydragon.Func_40160_a(5 - i, Field_40317_s);
                float   f10 = (float)Math.Cos((float)i * 0.45F + f8) * 0.15F;
                Neck.RotateAngleY   = ((UpdateRotations(ad3[0] - ad[0]) * (float)Math.PI) / 180F) * f5;
                Neck.RotateAngleX   = f10 + (((float)(ad3[1] - ad[1]) * (float)Math.PI) / 180F) * f5 * 5F;
                Neck.RotateAngleZ   = ((-UpdateRotations(ad3[0] - f7) * (float)Math.PI) / 180F) * f5;
                Neck.RotationPointY = f2;
                Neck.RotationPointZ = f3;
                Neck.RotationPointX = f4;
                f2 = (float)(f2 + Math.Sin(Neck.RotateAngleX) * 10);
                f3 = (float)(f3 - Math.Cos(Neck.RotateAngleY) * Math.Cos(Neck.RotateAngleX) * 10);
                f4 = (float)(f4 - Math.Sin(Neck.RotateAngleY) * Math.Cos(Neck.RotateAngleX) * 10);
                Neck.Render(par7);
            }

            Head.RotationPointY = f2;
            Head.RotationPointZ = f3;
            Head.RotationPointX = f4;
            float[] ad1 = entitydragon.Func_40160_a(0, Field_40317_s);
            Head.RotateAngleY = ((UpdateRotations(ad1[0] - ad[0]) * (float)Math.PI) / 180F) * 1.0F;
            Head.RotateAngleZ = ((-UpdateRotations(ad1[0] - f7) * (float)Math.PI) / 180F) * 1.0F;
            Head.Render(par7);
            //GL.PushMatrix();
            //GL.Translate(0.0F, 1.0F, 0.0F);
            //GL.Rotate(-f6 * f5 * 1.0F, 0.0F, 0.0F, 1.0F);
            //GL.Translate(0.0F, -1F, 0.0F);
            Body.RotateAngleZ = 0.0F;
            Body.Render(par7);

            for (int j = 0; j < 2; j++)
            {
                //GL.Enable(EnableCap.CullFace);
                float f11 = f * (float)Math.PI * 2.0F;
                Wing.RotateAngleX        = 0.125F - (float)Math.Cos(f11) * 0.2F;
                Wing.RotateAngleY        = 0.25F;
                Wing.RotateAngleZ        = (float)(Math.Sin(f11) + 0.125D) * 0.8F;
                WingTip.RotateAngleZ     = -(float)(Math.Sin(f11 + 2.0F) + 0.5D) * 0.75F;
                RearLeg.RotateAngleX     = 1.0F + f1 * 0.1F;
                RearLegTip.RotateAngleX  = 0.5F + f1 * 0.1F;
                RearFoot.RotateAngleX    = 0.75F + f1 * 0.1F;
                FrontLeg.RotateAngleX    = 1.3F + f1 * 0.1F;
                FrontLegTip.RotateAngleX = -0.5F - f1 * 0.1F;
                FrontFoot.RotateAngleX   = 0.75F + f1 * 0.1F;
                Wing.Render(par7);
                FrontLeg.Render(par7);
                RearLeg.Render(par7);
                //GL.Scale(-1F, 1.0F, 1.0F);

                if (j == 0)
                {
                    //GL.CullFace(CullFaceMode.Front);
                }
            }

            //GL.PopMatrix();
            //GL.CullFace(CullFaceMode.Back);
            //GL.Disable(EnableCap.CullFace);
            float f9 = -(float)Math.Sin(f * (float)Math.PI * 2.0F) * 0.0F;

            f8 = f * (float)Math.PI * 2.0F;
            f2 = 10F;
            f3 = 60F;
            f4 = 0.0F;
            ad = entitydragon.Func_40160_a(11, Field_40317_s);

            for (int k = 0; k < 12; k++)
            {
                float[] ad2 = entitydragon.Func_40160_a(12 + k, Field_40317_s);
                f9 = (float)((double)f9 + Math.Sin((float)k * 0.45F + f8) * 0.05000000074505806D);
                Neck.RotateAngleY   = ((UpdateRotations(ad2[0] - ad[0]) * f5 + 180F) * (float)Math.PI) / 180F;
                Neck.RotateAngleX   = f9 + (((float)(ad2[1] - ad[1]) * (float)Math.PI) / 180F) * f5 * 5F;
                Neck.RotateAngleZ   = ((UpdateRotations(ad2[0] - (double)f7) * (float)Math.PI) / 180F) * f5;
                Neck.RotationPointY = f2;
                Neck.RotationPointZ = f3;
                Neck.RotationPointX = f4;
                f2 = (float)(f2 + Math.Sin(Neck.RotateAngleX) * 10D);
                f3 = (float)(f3 - Math.Cos(Neck.RotateAngleY) * Math.Cos(Neck.RotateAngleX) * 10D);
                f4 = (float)(f4 - Math.Sin(Neck.RotateAngleY) * Math.Cos(Neck.RotateAngleX) * 10D);
                Neck.Render(par7);
            }

            //GL.PopMatrix();
        }