public virtual void AddEffect(EntityFX par1EntityFX)
        {
            int i = par1EntityFX.GetFXLayer();

            if (FxLayers[i].Count >= 4000)
            {
                FxLayers[i].RemoveAt(0);
            }

            FxLayers[i].Add(par1EntityFX);
        }
        /// <summary>
        /// Renders all current particles. Args player, partialTickTime
        /// </summary>
        public virtual void RenderParticles(Entity par1Entity, float par2)
        {
            float f  = ActiveRenderInfo.RotationX;
            float f1 = ActiveRenderInfo.RotationZ;
            float f2 = ActiveRenderInfo.RotationYZ;
            float f3 = ActiveRenderInfo.RotationXY;
            float f4 = ActiveRenderInfo.RotationXZ;

            EntityFX.InterpPosX = par1Entity.LastTickPosX + (par1Entity.PosX - par1Entity.LastTickPosX) * (double)par2;
            EntityFX.InterpPosY = par1Entity.LastTickPosY + (par1Entity.PosY - par1Entity.LastTickPosY) * (double)par2;
            EntityFX.InterpPosZ = par1Entity.LastTickPosZ + (par1Entity.PosZ - par1Entity.LastTickPosZ) * (double)par2;

            for (int i = 0; i < 3; i++)
            {
                if (FxLayers[i].Count == 0)
                {
                    continue;
                }

                int j = 0;

                if (i == 0)
                {
                    j = Renderer.GetTexture("/particles.png");
                }

                if (i == 1)
                {
                    j = Renderer.GetTexture("/terrain.png");
                }

                if (i == 2)
                {
                    j = Renderer.GetTexture("/gui/items.png");
                }

                //GL.BindTexture(TextureTarget.Texture2D, j);
                Tessellator tessellator = Tessellator.Instance;
                //GL.Color4(1.0F, 1.0F, 1.0F, 1.0F);
                tessellator.StartDrawingQuads();

                for (int k = 0; k < FxLayers[i].Count; k++)
                {
                    EntityFX entityfx = FxLayers[i][k];
                    tessellator.SetBrightness(entityfx.GetBrightnessForRender(par2));
                    entityfx.RenderParticle(tessellator, par2, f, f4, f1, f2, f3);
                }

                tessellator.Draw();
            }
        }
        public virtual void UpdateEffects()
        {
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < FxLayers[i].Count; j++)
                {
                    EntityFX entityfx = FxLayers[i][j];
                    entityfx.OnUpdate();

                    if (entityfx.IsDead)
                    {
                        FxLayers[i].RemoveAt(j--);
                    }
                }
            }
        }
        public virtual void Func_1187_b(Entity par1Entity, float par2)
        {
            float f  = MathHelper2.Cos(par1Entity.RotationYaw * 0.01745329F);
            float f1 = MathHelper2.Sin(par1Entity.RotationYaw * 0.01745329F);
            float f2 = -f1 *MathHelper2.Sin(par1Entity.RotationPitch * 0.01745329F);

            float f3    = f * MathHelper2.Sin(par1Entity.RotationPitch * 0.01745329F);
            float f4    = MathHelper2.Cos(par1Entity.RotationPitch * 0.01745329F);
            sbyte byte0 = 3;

            if (FxLayers[byte0].Count == 0)
            {
                return;
            }

            Tessellator tessellator = Tessellator.Instance;

            for (int i = 0; i < FxLayers[byte0].Count; i++)
            {
                EntityFX entityfx = FxLayers[byte0][i];
                tessellator.SetBrightness(entityfx.GetBrightnessForRender(par2));
                entityfx.RenderParticle(tessellator, par2, f, f4, f1, f2, f3);
            }
        }