      public EffectRenderer(World par1World, RenderEngine par2RenderEngine)
      {
          if (par1World != null)
-@@ -58,6 +70,17 @@
+@@ -52,12 +64,27 @@
+             for (int var2 = 0; var2 < this.fxLayers[var1].size(); ++var2)
+             {
+                 EntityFX var3 = (EntityFX)this.fxLayers[var1].get(var2);
+-                var3.onUpdate();
+-
+-                if (var3.isDead)
++
++                if (var3 != null)
++                {
++                    var3.onUpdate();
++                }
++
++                if (var3 == null || var3.isDead)
                  {
                      this.fxLayers[var1].remove(var2--);
                  }

                     }
                 }
             }
@@ -215,12 +260,60 @@
                 var8 = (double)par1 + var6.maxX + (double)var7;
             }
 

             }
         }
     }
@@ -105,12 +132,34 @@
                 for (int var11 = 0; var11 < this.fxLayers[var8].size(); ++var11)
                 {
                     EntityFX var12 = (EntityFX)this.fxLayers[var8].get(var11);
+                    if (var12 == null) continue;
                     var10.setBrightness(var12.getBrightnessForRender(par2));
                     var12.renderParticle(var10, par2, var3, var7, var4, var5, var6);
                 }
 
                 var10.draw();
             }
+        }
+
+        for (String key : effectList.keySet())
+        {
+            ForgeHooksClient.bindTexture(key, 0);
+            for (EntityFX entry : effectList.get(key))
+            {
+                if (entry == null) continue;
+                Tessellator tessallator = Tessellator.instance;
+                //GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderer.getTexture(key));
+                tessallator.startDrawingQuads();
