Example #1
0
        private void Func_40267_a(int par1, int par2)
        {
            Tessellator tessellator = Tessellator.Instance;
            float       f           = (float)((par1 % 16) * 16 + 0) / 256F;
            float       f1          = (float)((par1 % 16) * 16 + 16) / 256F;
            float       f2          = (float)((par1 / 16) * 16 + 0) / 256F;
            float       f3          = (float)((par1 / 16) * 16 + 16) / 256F;
            float       f4          = 1.0F;
            float       f5          = 0.5F;
            float       f6          = 0.25F;

            for (int i = 0; i < par2; i++)
            {
                //GL.PushMatrix();

                if (i > 0)
                {
                    float f7 = (Random.NextFloat() * 2.0F - 1.0F) * 0.3F;
                    float f8 = (Random.NextFloat() * 2.0F - 1.0F) * 0.3F;
                    float f9 = (Random.NextFloat() * 2.0F - 1.0F) * 0.3F;
                    //GL.Translate(f7, f8, f9);
                }

                //GL.Rotate(180F - RenderManager.PlayerViewY, 0.0F, 1.0F, 0.0F);
                tessellator.StartDrawingQuads();
                tessellator.SetNormal(0.0F, 1.0F, 0.0F);
                tessellator.AddVertexWithUV(0.0F - f5, 0.0F - f6, 0.0F, f, f3);
                tessellator.AddVertexWithUV(f4 - f5, 0.0F - f6, 0.0F, f1, f3);
                tessellator.AddVertexWithUV(f4 - f5, 1.0F - f6, 0.0F, f1, f2);
                tessellator.AddVertexWithUV(0.0F - f5, 1.0F - f6, 0.0F, f, f2);
                tessellator.Draw();
                //GL.PopMatrix();
            }
        }
        public virtual void DoRenderFireball(EntityFireball par1EntityFireball, double par2, double par4, double par6, float par8, float par9)
        {
            //GL.PushMatrix();
            //GL.Translate((float)par2, (float)par4, (float)par6);
            //GL.Enable(EnableCap.RescaleNormal);
            float f = Field_40269_a;
            //GL.Scale(f / 1.0F, f / 1.0F, f / 1.0F);
            sbyte byte0 = 46;

            LoadTexture("/gui/items.png");
            Tessellator tessellator = Tessellator.Instance;
            float       f1          = (float)((byte0 % 16) * 16 + 0) / 256F;
            float       f2          = (float)((byte0 % 16) * 16 + 16) / 256F;
            float       f3          = (float)((byte0 / 16) * 16 + 0) / 256F;
            float       f4          = (float)((byte0 / 16) * 16 + 16) / 256F;
            float       f5          = 1.0F;
            float       f6          = 0.5F;
            float       f7          = 0.25F;

            //GL.Rotate(180F - RenderManager.PlayerViewY, 0.0F, 1.0F, 0.0F);
            //GL.Rotate(-RenderManager.PlayerViewX, 1.0F, 0.0F, 0.0F);
            tessellator.StartDrawingQuads();
            tessellator.SetNormal(0.0F, 1.0F, 0.0F);
            tessellator.AddVertexWithUV(0.0F - f6, 0.0F - f7, 0.0F, f1, f4);
            tessellator.AddVertexWithUV(f5 - f6, 0.0F - f7, 0.0F, f2, f4);
            tessellator.AddVertexWithUV(f5 - f6, 1.0F - f7, 0.0F, f2, f3);
            tessellator.AddVertexWithUV(0.0F - f6, 1.0F - f7, 0.0F, f1, f3);
            tessellator.Draw();
            //GL.Disable(EnableCap.RescaleNormal);
            //GL.PopMatrix();
        }
        public virtual void Func_35438_a(EntityXPOrb par1EntityXPOrb, double par2, double par4, double par6, float par8, float par9)
        {
            //GL.PushMatrix();
            //GL.Translate((float)par2, (float)par4, (float)par6);
            int i = par1EntityXPOrb.GetTextureByXP();

            LoadTexture("/item/xporb.png");
            Tessellator tessellator = Tessellator.Instance;
            float       f           = (float)((i % 4) * 16 + 0) / 64F;
            float       f1          = (float)((i % 4) * 16 + 16) / 64F;
            float       f2          = (float)((i / 4) * 16 + 0) / 64F;
            float       f3          = (float)((i / 4) * 16 + 16) / 64F;
            float       f4          = 1.0F;
            float       f5          = 0.5F;
            float       f6          = 0.25F;
            int         i7          = par1EntityXPOrb.GetBrightnessForRender(par9);
            float       f8          = i7 % 0x10000;
            int         j           = i7 / 0x10000;

            OpenGlHelper.SetLightmapTextureCoords(OpenGlHelper.LightmapTexUnit, (float)f8 / 1.0F, (float)j / 1.0F);
            //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F);
            float f7 = 255F;

            f8 = ((float)par1EntityXPOrb.XpColor + par9) / 2.0F;
            j  = (int)((MathHelper2.Sin(f8 + 0.0F) + 1.0F) * 0.5F * f7);
            int k  = (int)f7;
            int l  = (int)((MathHelper2.Sin(f8 + 4.18879F) + 1.0F) * 0.1F * f7);
            int i1 = j << 16 | k << 8 | l;
            //GL.Rotate(180F - RenderManager.PlayerViewY, 0.0F, 1.0F, 0.0F);
            //GL.Rotate(-RenderManager.PlayerViewX, 1.0F, 0.0F, 0.0F);
            float f9 = 0.3F;

            //GL.Scale(f9, f9, f9);
            tessellator.StartDrawingQuads();
            tessellator.SetColorRGBA_I(i1, 128);
            tessellator.SetNormal(0.0F, 1.0F, 0.0F);
            tessellator.AddVertexWithUV(0.0F - f5, 0.0F - f6, 0.0F, f, f3);
            tessellator.AddVertexWithUV(f4 - f5, 0.0F - f6, 0.0F, f1, f3);
            tessellator.AddVertexWithUV(f4 - f5, 1.0F - f6, 0.0F, f1, f2);
            tessellator.AddVertexWithUV(0.0F - f5, 1.0F - f6, 0.0F, f, f2);
            tessellator.Draw();
            //GL.Disable(EnableCap.Blend);
            //GL.Disable(EnableCap.RescaleNormal);
            //GL.PopMatrix();
        }
        private void Func_40265_a(Tessellator par1Tessellator, int par2)
        {
            float f  = (float)((par2 % 16) * 16 + 0) / 256F;
            float f1 = (float)((par2 % 16) * 16 + 16) / 256F;
            float f2 = (float)((par2 / 16) * 16 + 0) / 256F;
            float f3 = (float)((par2 / 16) * 16 + 16) / 256F;
            float f4 = 1.0F;
            float f5 = 0.5F;
            float f6 = 0.25F;

            //GL.Rotate(180F - RenderManager.PlayerViewY, 0.0F, 1.0F, 0.0F);
            //GL.Rotate(-RenderManager.PlayerViewX, 1.0F, 0.0F, 0.0F);
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(0.0F, 1.0F, 0.0F);
            par1Tessellator.AddVertexWithUV(0.0F - f5, 0.0F - f6, 0.0F, f, f3);
            par1Tessellator.AddVertexWithUV(f4 - f5, 0.0F - f6, 0.0F, f1, f3);
            par1Tessellator.AddVertexWithUV(f4 - f5, f4 - f6, 0.0F, f1, f2);
            par1Tessellator.AddVertexWithUV(0.0F - f5, f4 - f6, 0.0F, f, f2);
            par1Tessellator.Draw();
        }
        public override void RenderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
        {
            int i = (int)((((float)Field_35130_a + par2) * 15F) / (float)Field_35129_ay);

            if (i > 15)
            {
                return;
            }
            else
            {
                Field_35128_az.BindTexture("misc.explosion.png");
                float f  = (float)(i % 4) / 4F;
                float f1 = f + 0.24975F;
                float f2 = (float)(i / 4) / 4F;
                float f3 = f2 + 0.24975F;
                float f4 = 2.0F * Field_35131_aA;
                float f5 = (float)((PrevPosX + (PosX - PrevPosX) * (double)par2) - InterpPosX);
                float f6 = (float)((PrevPosY + (PosY - PrevPosY) * (double)par2) - InterpPosY);
                float f7 = (float)((PrevPosZ + (PosZ - PrevPosZ) * (double)par2) - InterpPosZ);
                //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F);
                //GL.Disable(EnableCap.Lighting);
                RenderHelper.DisableStandardItemLighting();
                par1Tessellator.StartDrawingQuads();
                par1Tessellator.SetColorRGBA_F(ParticleRed, ParticleGreen, ParticleBlue, 1.0F);
                par1Tessellator.SetNormal(0.0F, 1.0F, 0.0F);
                par1Tessellator.SetBrightness(240);
                par1Tessellator.AddVertexWithUV(f5 - par3 * f4 - par6 * f4, f6 - par4 * f4, f7 - par5 * f4 - par7 * f4, f1, f3);
                par1Tessellator.AddVertexWithUV((f5 - par3 * f4) + par6 * f4, f6 + par4 * f4, (f7 - par5 * f4) + par7 * f4, f1, f2);
                par1Tessellator.AddVertexWithUV(f5 + par3 * f4 + par6 * f4, f6 + par4 * f4, f7 + par5 * f4 + par7 * f4, f, f2);
                par1Tessellator.AddVertexWithUV((f5 + par3 * f4) - par6 * f4, f6 - par4 * f4, (f7 + par5 * f4) - par7 * f4, f, f3);
                par1Tessellator.Draw();
                //GL.PolygonOffset(0.0F, 0.0F);
                //GL.Enable(EnableCap.Lighting);
                return;
            }
        }
        /// <summary>
        /// Renders a white box with the bounds of the AABB translated by the offset. Args: aabb, x, y, z
        /// </summary>
        public static void RenderOffsetAABB(AxisAlignedBB par0AxisAlignedBB, double par1, double par3, double par5)
        {
            //GL.Disable(EnableCap.Texture2D);
            Tessellator tessellator = Tessellator.Instance;

            //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F);
            tessellator.StartDrawingQuads();
            tessellator.SetTranslation(par1, par3, par5);
            tessellator.SetNormal(0.0F, 0.0F, -1F);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.SetNormal(0.0F, 0.0F, 1.0F);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.SetNormal(0.0F, -1F, 0.0F);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.SetNormal(0.0F, 1.0F, 0.0F);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.SetNormal(-1F, 0.0F, 0.0F);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MinX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.SetNormal(1.0F, 0.0F, 0.0F);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MinZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MaxY, par0AxisAlignedBB.MaxZ);
            tessellator.AddVertex(par0AxisAlignedBB.MaxX, par0AxisAlignedBB.MinY, par0AxisAlignedBB.MaxZ);
            tessellator.SetTranslation(0.0F, 0.0F, 0.0F);
            tessellator.Draw();
            //GL.Enable(EnableCap.Texture2D);
        }
Example #7
0
        /// <summary>
        /// Renders an item held in hand as a 2D texture with thickness
        /// </summary>
        private void RenderItemIn2D(Tessellator par1Tessellator, float par2, float par3, float par4, float par5)
        {
            float f  = 1.0F;
            float f1 = 0.0625F;

            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(0.0F, 0.0F, 1.0F);
            par1Tessellator.AddVertexWithUV(0.0F, 0.0F, 0.0F, par2, par5);
            par1Tessellator.AddVertexWithUV(f, 0.0F, 0.0F, par4, par5);
            par1Tessellator.AddVertexWithUV(f, 1.0D, 0.0F, par4, par3);
            par1Tessellator.AddVertexWithUV(0.0F, 1.0D, 0.0F, par2, par3);
            par1Tessellator.Draw();
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(0.0F, 0.0F, -1F);
            par1Tessellator.AddVertexWithUV(0.0F, 1.0D, 0.0F - f1, par2, par3);
            par1Tessellator.AddVertexWithUV(f, 1.0D, 0.0F - f1, par4, par3);
            par1Tessellator.AddVertexWithUV(f, 0.0F, 0.0F - f1, par4, par5);
            par1Tessellator.AddVertexWithUV(0.0F, 0.0F, 0.0F - f1, par2, par5);
            par1Tessellator.Draw();
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(-1F, 0.0F, 0.0F);

            for (int i = 0; i < 16; i++)
            {
                float f2  = (float)i / 16F;
                float f6  = (par2 + (par4 - par2) * f2) - 0.001953125F;
                float f10 = f * f2;
                par1Tessellator.AddVertexWithUV(f10, 0.0F, 0.0F - f1, f6, par5);
                par1Tessellator.AddVertexWithUV(f10, 0.0F, 0.0F, f6, par5);
                par1Tessellator.AddVertexWithUV(f10, 1.0D, 0.0F, f6, par3);
                par1Tessellator.AddVertexWithUV(f10, 1.0D, 0.0F - f1, f6, par3);
            }

            par1Tessellator.Draw();
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(1.0F, 0.0F, 0.0F);

            for (int j = 0; j < 16; j++)
            {
                float f3  = (float)j / 16F;
                float f7  = (par2 + (par4 - par2) * f3) - 0.001953125F;
                float f11 = f * f3 + 0.0625F;
                par1Tessellator.AddVertexWithUV(f11, 1.0D, 0.0F - f1, f7, par3);
                par1Tessellator.AddVertexWithUV(f11, 1.0D, 0.0F, f7, par3);
                par1Tessellator.AddVertexWithUV(f11, 0.0F, 0.0F, f7, par5);
                par1Tessellator.AddVertexWithUV(f11, 0.0F, 0.0F - f1, f7, par5);
            }

            par1Tessellator.Draw();
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(0.0F, 1.0F, 0.0F);

            for (int k = 0; k < 16; k++)
            {
                float f4  = (float)k / 16F;
                float f8  = (par5 + (par3 - par5) * f4) - 0.001953125F;
                float f12 = f * f4 + 0.0625F;
                par1Tessellator.AddVertexWithUV(0.0F, f12, 0.0F, par2, f8);
                par1Tessellator.AddVertexWithUV(f, f12, 0.0F, par4, f8);
                par1Tessellator.AddVertexWithUV(f, f12, 0.0F - f1, par4, f8);
                par1Tessellator.AddVertexWithUV(0.0F, f12, 0.0F - f1, par2, f8);
            }

            par1Tessellator.Draw();
            par1Tessellator.StartDrawingQuads();
            par1Tessellator.SetNormal(0.0F, -1F, 0.0F);

            for (int l = 0; l < 16; l++)
            {
                float f5  = (float)l / 16F;
                float f9  = (par5 + (par3 - par5) * f5) - 0.001953125F;
                float f13 = f * f5;
                par1Tessellator.AddVertexWithUV(f, f13, 0.0F, par4, f9);
                par1Tessellator.AddVertexWithUV(0.0F, f13, 0.0F, par2, f9);
                par1Tessellator.AddVertexWithUV(0.0F, f13, 0.0F - f1, par2, f9);
                par1Tessellator.AddVertexWithUV(f, f13, 0.0F - f1, par4, f9);
            }

            par1Tessellator.Draw();
        }
        private void Func_159_a(EntityPainting par1EntityPainting, int par2, int par3, int par4, int par5)
        {
            float f  = (float)(-par2) / 2.0F;
            float f1 = (float)(-par3) / 2.0F;
            float f2 = -0.5F;
            float f3 = 0.5F;

            for (int i = 0; i < par2 / 16; i++)
            {
                for (int j = 0; j < par3 / 16; j++)
                {
                    float f4 = f + (float)((i + 1) * 16);
                    float f5 = f + (float)(i * 16);
                    float f6 = f1 + (float)((j + 1) * 16);
                    float f7 = f1 + (float)(j * 16);
                    Func_160_a(par1EntityPainting, (f4 + f5) / 2.0F, (f6 + f7) / 2.0F);
                    float       f8          = (float)((par4 + par2) - i * 16) / 256F;
                    float       f9          = (float)((par4 + par2) - (i + 1) * 16) / 256F;
                    float       f10         = (float)((par5 + par3) - j * 16) / 256F;
                    float       f11         = (float)((par5 + par3) - (j + 1) * 16) / 256F;
                    float       f12         = 0.75F;
                    float       f13         = 0.8125F;
                    float       f14         = 0.0F;
                    float       f15         = 0.0625F;
                    float       f16         = 0.75F;
                    float       f17         = 0.8125F;
                    float       f18         = 0.001953125F;
                    float       f19         = 0.001953125F;
                    float       f20         = 0.7519531F;
                    float       f21         = 0.7519531F;
                    float       f22         = 0.0F;
                    float       f23         = 0.0625F;
                    Tessellator tessellator = Tessellator.Instance;
                    tessellator.StartDrawingQuads();
                    tessellator.SetNormal(0.0F, 0.0F, -1F);
                    tessellator.AddVertexWithUV(f4, f7, f2, f9, f10);
                    tessellator.AddVertexWithUV(f5, f7, f2, f8, f10);
                    tessellator.AddVertexWithUV(f5, f6, f2, f8, f11);
                    tessellator.AddVertexWithUV(f4, f6, f2, f9, f11);
                    tessellator.SetNormal(0.0F, 0.0F, 1.0F);
                    tessellator.AddVertexWithUV(f4, f6, f3, f12, f14);
                    tessellator.AddVertexWithUV(f5, f6, f3, f13, f14);
                    tessellator.AddVertexWithUV(f5, f7, f3, f13, f15);
                    tessellator.AddVertexWithUV(f4, f7, f3, f12, f15);
                    tessellator.SetNormal(0.0F, 1.0F, 0.0F);
                    tessellator.AddVertexWithUV(f4, f6, f2, f16, f18);
                    tessellator.AddVertexWithUV(f5, f6, f2, f17, f18);
                    tessellator.AddVertexWithUV(f5, f6, f3, f17, f19);
                    tessellator.AddVertexWithUV(f4, f6, f3, f16, f19);
                    tessellator.SetNormal(0.0F, -1F, 0.0F);
                    tessellator.AddVertexWithUV(f4, f7, f3, f16, f18);
                    tessellator.AddVertexWithUV(f5, f7, f3, f17, f18);
                    tessellator.AddVertexWithUV(f5, f7, f2, f17, f19);
                    tessellator.AddVertexWithUV(f4, f7, f2, f16, f19);
                    tessellator.SetNormal(-1F, 0.0F, 0.0F);
                    tessellator.AddVertexWithUV(f4, f6, f3, f21, f22);
                    tessellator.AddVertexWithUV(f4, f7, f3, f21, f23);
                    tessellator.AddVertexWithUV(f4, f7, f2, f20, f23);
                    tessellator.AddVertexWithUV(f4, f6, f2, f20, f22);
                    tessellator.SetNormal(1.0F, 0.0F, 0.0F);
                    tessellator.AddVertexWithUV(f5, f6, f2, f21, f22);
                    tessellator.AddVertexWithUV(f5, f7, f2, f21, f23);
                    tessellator.AddVertexWithUV(f5, f7, f3, f20, f23);
                    tessellator.AddVertexWithUV(f5, f6, f3, f20, f22);
                    tessellator.Draw();
                }
            }
        }
Example #9
0
        /// <summary>
        /// Actually renders the fishing line and hook
        /// </summary>
        public virtual void DoRenderFishHook(EntityFishHook par1EntityFishHook, double par2, double par4, double par6, float par8, float par9)
        {
            //GL.PushMatrix();
            //GL.Translate((float)par2, (float)par4, (float)par6);
            //GL.Enable(EnableCap.RescaleNormal);
            //GL.Scale(0.5F, 0.5F, 0.5F);
            int   i     = 1;
            sbyte byte0 = 2;

            LoadTexture("/particles.png");
            Tessellator tessellator = Tessellator.Instance;
            float       f           = (float)(i * 8 + 0) / 128F;
            float       f1          = (float)(i * 8 + 8) / 128F;
            float       f2          = (float)(byte0 * 8 + 0) / 128F;
            float       f3          = (float)(byte0 * 8 + 8) / 128F;
            float       f4          = 1.0F;
            float       f5          = 0.5F;
            float       f6          = 0.5F;

            //GL.Rotate(180F - RenderManager.PlayerViewY, 0.0F, 1.0F, 0.0F);
            //GL.Rotate(-RenderManager.PlayerViewX, 1.0F, 0.0F, 0.0F);
            tessellator.StartDrawingQuads();
            tessellator.SetNormal(0.0F, 1.0F, 0.0F);
            tessellator.AddVertexWithUV(0.0F - f5, 0.0F - f6, 0.0F, f, f3);
            tessellator.AddVertexWithUV(f4 - f5, 0.0F - f6, 0.0F, f1, f3);
            tessellator.AddVertexWithUV(f4 - f5, 1.0F - f6, 0.0F, f1, f2);
            tessellator.AddVertexWithUV(0.0F - f5, 1.0F - f6, 0.0F, f, f2);
            tessellator.Draw();
            //GL.Disable(EnableCap.RescaleNormal);
            //GL.PopMatrix();

            if (par1EntityFishHook.Angler != null)
            {
                float  f7    = ((par1EntityFishHook.Angler.PrevRotationYaw + (par1EntityFishHook.Angler.RotationYaw - par1EntityFishHook.Angler.PrevRotationYaw) * par9) * (float)Math.PI) / 180F;
                double d     = MathHelper2.Sin(f7);
                double d2    = MathHelper2.Cos(f7);
                float  f9    = par1EntityFishHook.Angler.GetSwingProgress(par9);
                float  f10   = MathHelper2.Sin(MathHelper2.Sqrt_float(f9) * (float)Math.PI);
                Vec3D  vec3d = Vec3D.CreateVector(-0.5D, 0.029999999999999999D, 0.80000000000000004D);
                vec3d.RotateAroundX((-(par1EntityFishHook.Angler.PrevRotationPitch + (par1EntityFishHook.Angler.RotationPitch - par1EntityFishHook.Angler.PrevRotationPitch) * par9) * (float)Math.PI) / 180F);
                vec3d.RotateAroundY((-(par1EntityFishHook.Angler.PrevRotationYaw + (par1EntityFishHook.Angler.RotationYaw - par1EntityFishHook.Angler.PrevRotationYaw) * par9) * (float)Math.PI) / 180F);
                vec3d.RotateAroundY(f10 * 0.5F);
                vec3d.RotateAroundX(-f10 * 0.7F);
                double d4 = par1EntityFishHook.Angler.PrevPosX + (par1EntityFishHook.Angler.PosX - par1EntityFishHook.Angler.PrevPosX) * (double)par9 + vec3d.XCoord;
                double d5 = par1EntityFishHook.Angler.PrevPosY + (par1EntityFishHook.Angler.PosY - par1EntityFishHook.Angler.PrevPosY) * (double)par9 + vec3d.YCoord;
                double d6 = par1EntityFishHook.Angler.PrevPosZ + (par1EntityFishHook.Angler.PosZ - par1EntityFishHook.Angler.PrevPosZ) * (double)par9 + vec3d.ZCoord;

                if (RenderManager.Options.ThirdPersonView > 0)
                {
                    float  f8 = ((par1EntityFishHook.Angler.PrevRenderYawOffset + (par1EntityFishHook.Angler.RenderYawOffset - par1EntityFishHook.Angler.PrevRenderYawOffset) * par9) * (float)Math.PI) / 180F;
                    double d1 = MathHelper2.Sin(f8);
                    double d3 = MathHelper2.Cos(f8);
                    d4 = (par1EntityFishHook.Angler.PrevPosX + (par1EntityFishHook.Angler.PosX - par1EntityFishHook.Angler.PrevPosX) * (double)par9) - d3 * 0.34999999999999998D - d1 * 0.84999999999999998D;
                    d5 = (par1EntityFishHook.Angler.PrevPosY + (par1EntityFishHook.Angler.PosY - par1EntityFishHook.Angler.PrevPosY) * (double)par9) - 0.45000000000000001D;
                    d6 = ((par1EntityFishHook.Angler.PrevPosZ + (par1EntityFishHook.Angler.PosZ - par1EntityFishHook.Angler.PrevPosZ) * (double)par9) - d1 * 0.34999999999999998D) + d3 * 0.84999999999999998D;
                }

                double d7  = par1EntityFishHook.PrevPosX + (par1EntityFishHook.PosX - par1EntityFishHook.PrevPosX) * (double)par9;
                double d8  = par1EntityFishHook.PrevPosY + (par1EntityFishHook.PosY - par1EntityFishHook.PrevPosY) * (double)par9 + 0.25D;
                double d9  = par1EntityFishHook.PrevPosZ + (par1EntityFishHook.PosZ - par1EntityFishHook.PrevPosZ) * (double)par9;
                double d10 = (float)(d4 - d7);
                double d11 = (float)(d5 - d8);
                double d12 = (float)(d6 - d9);
                //GL.Disable(EnableCap.Texture2D);
                //GL.Disable(EnableCap.Lighting);
                tessellator.StartDrawing(3);
                tessellator.SetColorOpaque_I(0);
                int j = 16;

                for (int k = 0; k <= j; k++)
                {
                    float f11 = (float)k / (float)j;
                    tessellator.AddVertex(par2 + d10 * (double)f11, par4 + d11 * (double)(f11 * f11 + f11) * 0.5D + 0.25D, par6 + d12 * (double)f11);
                }

                tessellator.Draw();
                //GL.Enable(EnableCap.Lighting);
                //GL.Enable(EnableCap.Texture2D);
            }
        }