/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package tk.wurst_client.features.mods;

import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import tk.wurst_client.events.listeners.RenderListener;
import tk.wurst_client.features.Feature;
import tk.wurst_client.utils.RenderUtils;

@Mod.Info(description = "Allows you to see items through walls.",
	name = "ItemESP",
	tags = "item esp",
	help = "Mods/ItemESP")
@Mod.Bypasses
public class ItemEspMod extends Mod implements RenderListener
{
	@Override
	public Feature[] getSeeAlso()
	{
		return new Feature[]{wurst.mods.chestEspMod};
	}
	
	@Override
	public void onEnable()
	{
		wurst.events.add(RenderListener.class, this);
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(RenderListener.class, this);
	}
	
	@Override
	public void onRender()
	{
		for(Object entity : mc.world.loadedEntityList)
			if(entity instanceof EntityItem)
				RenderUtils.entityESPBox((Entity)entity, 2);
	}
}

@@ -311,16 +311,47 @@
 .mods;%0A%0A
+import org.lwjgl.opengl.GL11;%0A%0A
 import n
@@ -423,16 +423,62 @@
 tyItem;%0A
+import net.minecraft.util.math.AxisAlignedBB;%0A
 import t
@@ -816,16 +816,125 @@
 tener%0A%7B%0A
+%09private static final AxisAlignedBB ITEM_BOX =%0A%09%09new AxisAlignedBB(-0.175, 0, -0.175, 0.175, 0.35, 0.175);%0A%09%0A
 %09@Overri
@@ -1253,137 +1253,954 @@
 %7B%0A%09%09
-for(Object entity : mc.world.loadedEntityList)%0A%09%09%09if(entity instanceof EntityItem)%0A%09%09%09%09RenderUtils.entityESPBox((Entity)entity, 2
+// GL settings%0A%09%09GL11.glEnable(GL11.GL_BLEND);%0A%09%09GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);%0A%09%09GL11.glEnable(GL11.GL_LINE_SMOOTH);%0A%09%09GL11.glLineWidth(2);%0A%09%09GL11.glDisable(GL11.GL_TEXTURE_2D);%0A%09%09GL11.glEnable(GL11.GL_CULL_FACE);%0A%09%09GL11.glDisable(GL11.GL_DEPTH_TEST);%0A%09%09%0A%09%09GL11.glPushMatrix();%0A%09%09GL11.glTranslated(-mc.getRenderManager().renderPosX,%0A%09%09%09-mc.getRenderManager().renderPosY,%0A%09%09%09-mc.getRenderManager().renderPosZ);%0A%09%09%0A%09%09GL11.glColor4d(1, 1, 0, 0.5F);%0A%09%09%0A%09%09// draw boxes%0A%09%09for(Entity entity : mc.world.loadedEntityList)%0A%09%09%09if(entity instanceof EntityItem)%0A%09%09%09%7B%0A%09%09%09%09GL11.glPushMatrix();%0A%09%09%09%09GL11.glTranslated(entity.posX, entity.posY, entity.posZ);%0A%09%09%09%09%0A%09%09%09%09RenderUtils.drawOutlinedBox(ITEM_BOX);%0A%09%09%09%09%0A%09%09%09%09GL11.glPopMatrix();%0A%09%09%09%7D%0A%09%09%0A%09%09GL11.glPopMatrix();%0A%09%09%0A%09%09// GL resets%0A%09%09GL11.glEnable(GL11.GL_DEPTH_TEST);%0A%09%09GL11.glEnable(GL11.GL_TEXTURE_2D);%0A%09%09GL11.glDisable(GL11.GL_BLEND);%0A%09%09GL11.glDisable(GL11.GL_LINE_SMOOTH
 );%0A%09

Update ItemESP