 +import static org.lwjgl.opengl.GL11.glEnd;
 +import static org.lwjgl.opengl.GL11.glVertex2d;
 +
- import java.awt.Color;
- import java.util.ArrayList;
- import java.util.Collection;
- import java.util.Iterator;
- import java.util.Random;
-+
- import net.minecraft.block.material.Material;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.renderer.GlStateManager;
++import java.awt.Color;
++import java.util.ArrayList;
++import java.util.Collection;
++import java.util.Iterator;
++import java.util.Random;
++
++import net.minecraft.block.material.Material;
++import net.minecraft.client.Minecraft;
++import net.minecraft.client.renderer.GlStateManager;
 +import net.minecraft.client.renderer.OpenGlHelper;
- import net.minecraft.client.renderer.RenderHelper;
- import net.minecraft.client.renderer.Tessellator;
- import net.minecraft.client.renderer.WorldRenderer;
-@@ -43,11 +55,26 @@ import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.StringUtils;
- import net.minecraft.world.border.WorldBorder;
- 
++import net.minecraft.client.renderer.RenderHelper;
++import net.minecraft.client.renderer.Tessellator;
++import net.minecraft.client.renderer.WorldRenderer;
++import net.minecraft.client.renderer.entity.RenderItem;
++import net.minecraft.client.renderer.texture.TextureAtlasSprite;
++import net.minecraft.client.renderer.texture.TextureMap;
++import net.minecraft.client.resources.I18n;
++import net.minecraft.entity.Entity;
++import net.minecraft.entity.EntityLivingBase;
++import net.minecraft.entity.SharedMonsterAttributes;
++import net.minecraft.entity.ai.attributes.IAttributeInstance;
++import net.minecraft.entity.boss.BossStatus;
++import net.minecraft.entity.player.EntityPlayer;
++import net.minecraft.init.Blocks;
++import net.minecraft.inventory.IInventory;
++import net.minecraft.item.Item;
++import net.minecraft.item.ItemStack;
++import net.minecraft.potion.Potion;
++import net.minecraft.scoreboard.Score;
++import net.minecraft.scoreboard.ScoreObjective;
++import net.minecraft.scoreboard.ScorePlayerTeam;
++import net.minecraft.scoreboard.Scoreboard;
++import net.minecraft.util.BlockPos;
++import net.minecraft.util.EnumChatFormatting;
++import net.minecraft.util.FoodStats;
++import net.minecraft.util.IChatComponent;
++import net.minecraft.util.MathHelper;
++import net.minecraft.util.MovingObjectPosition;
++import net.minecraft.util.ResourceLocation;
++import net.minecraft.util.StringUtils;
++import net.minecraft.world.border.WorldBorder;
++
 +import org.darkstorm.minecraft.gui.util.RenderUtil;
 +import org.lwjgl.opengl.GL11;
 +
 +import tk.wurst_client.Client;
++import tk.wurst_client.event.EventManager;
++import tk.wurst_client.event.events.GUIRenderEvent;
 +import tk.wurst_client.font.Fonts;
 +import tk.wurst_client.gui.UIRenderer;
 +import tk.wurst_client.module.Module;

+            wr.addVertexWithUV((double)x + w, (double)y + 0, (double)this.zLevel, (double)((float)(u1 + fw) * 0.00390625F), (double)((float)(v1 + 0) * 0.00390625F));
+            wr.addVertexWithUV((double)x + 0, (double)y + 0, (double)this.zLevel, (double)((float)(u1 + 0) * 0.00390625F), (double)((float)(v1 + 0) * 0.00390625F));
+            ts.draw();
+            for(Module eventModule : Client.wurst.moduleManager.activeModules)
+            {
+            	eventModule.onRenderGUI();
+            }
+            GL11.glDepthMask(true);
+            GL11.glEnable(GL11.GL_DEPTH_TEST);
+            GL11.glEnable(GL11.GL_ALPHA_TEST);

+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+public class GuiIngame extends Gui
+{
+    private static final ResourceLocation vignetteTexPath = new ResourceLocation("textures/misc/vignette.png");
+    private static final ResourceLocation widgetsTexPath = new ResourceLocation("textures/gui/widgets.png");
+    private static final ResourceLocation pumpkinBlurTexPath = new ResourceLocation("textures/misc/pumpkinblur.png");
+    //TODO: Client
+    private static final ResourceLocation wurstTextures = new ResourceLocation("wurst/wurst_128.png");
+    private final Random rand = new Random();
+    private final Minecraft mc;
+    private final RenderItem itemRenderer;
+
+    /** ChatGUI instance that retains all previous chat data */
+    private final GuiNewChat persistantChatGUI;
+    private final GuiStreamIndicator streamIndicator;
+    private int updateCounter;
+
+    /** The string specifying which record music is playing */
+    private String recordPlaying = "";
+
+    /** How many ticks the record playing message will be displayed */
+    private int recordPlayingUpFor;
+    private boolean recordIsPlaying;
+
+    /** Previous frame vignette brightness (slowly changes by 1% each frame) */
+    public float prevVignetteBrightness = 1.0F;
+
+    /** Remaining ticks the item highlight should be visible */
+    private int remainingHighlightTicks;
+
+    /** The ItemStack that is currently being highlighted */
+    private ItemStack highlightingItemStack;
+    private final GuiOverlayDebug overlayDebug;
+    private final GuiSpectator field_175197_u;
+    private final GuiPlayerTabOverlay overlayPlayerList;
+    private int field_175195_w;
+    private String field_175201_x = "";
+    private String field_175200_y = "";
+    private int field_175199_z;
+    private int field_175192_A;
+    private int field_175193_B;
+    private int field_175194_C = 0;
+    private int field_175189_D = 0;
+    private long field_175190_E = 0L;
+    private long field_175191_F = 0L;
+    private static final String __OBFID = "CL_00000661";
+
+    public GuiIngame(Minecraft mcIn)
+    {
+        this.mc = mcIn;
+        this.itemRenderer = mcIn.getRenderItem();
+        this.overlayDebug = new GuiOverlayDebug(mcIn);
+        this.field_175197_u = new GuiSpectator(mcIn);
+        this.persistantChatGUI = new GuiNewChat(mcIn);
+        this.streamIndicator = new GuiStreamIndicator(mcIn);
+        this.overlayPlayerList = new GuiPlayerTabOverlay(mcIn, this);
+        this.func_175177_a();
+    }
+
+    public void func_175177_a()
+    {
+        this.field_175199_z = 10;
+        this.field_175192_A = 70;
+        this.field_175193_B = 20;
+    }
+
+    public void func_175180_a(float p_175180_1_)
+    {
+        ScaledResolution var2 = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
+        int var3 = var2.getScaledWidth();
+        int var4 = var2.getScaledHeight();
+        this.mc.entityRenderer.setupOverlayRendering();
+        GlStateManager.enableBlend();
+
+        if (Minecraft.isFancyGraphicsEnabled())
+        {
+            this.func_180480_a(this.mc.thePlayer.getBrightness(p_175180_1_), var2);
+        }
+        else
+        {
+            GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+        }
+
+        ItemStack var5 = this.mc.thePlayer.inventory.armorItemInSlot(3);
+
+        if (this.mc.gameSettings.thirdPersonView == 0 && var5 != null && var5.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
+        {
+            this.func_180476_e(var2);
+        }
+
+        if (!this.mc.thePlayer.isPotionActive(Potion.confusion))
+        {
+            float var6 = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * p_175180_1_;
+
+            if (var6 > 0.0F)
+            {
+                this.func_180474_b(var6, var2);
+            }
+        }
+
+        if (this.mc.playerController.enableEverythingIsScrewedUpMode())
+        {
+            this.field_175197_u.func_175264_a(var2, p_175180_1_);
+        }
+        else
+        {
+            this.func_180479_a(var2, p_175180_1_);
+        }
+
+        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+        this.mc.getTextureManager().bindTexture(icons);
+        GlStateManager.enableBlend();
+
+        if (this.func_175183_b())
+        {
+            GlStateManager.tryBlendFuncSeparate(775, 769, 1, 0);
+            GlStateManager.enableAlpha();
+            this.drawTexturedModalRect(var3 / 2 - 7, var4 / 2 - 7, 0, 0, 16, 16);
+        }
+
+        GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+        this.mc.mcProfiler.startSection("bossHealth");
+        this.renderBossHealth();
+        this.mc.mcProfiler.endSection();
+
+        if (this.mc.playerController.shouldDrawHUD())
+        {
+            this.func_180477_d(var2);
+        }
+
+        GlStateManager.disableBlend();
+        float var7;
+        int var8;
+        int var11;
+
+        if (this.mc.thePlayer.getSleepTimer() > 0)
+        {
+            this.mc.mcProfiler.startSection("sleep");
+            GlStateManager.disableDepth();
+            GlStateManager.disableAlpha();
+            var11 = this.mc.thePlayer.getSleepTimer();
+            var7 = (float)var11 / 100.0F;
+
+            if (var7 > 1.0F)
+            {
+                var7 = 1.0F - (float)(var11 - 100) / 10.0F;
+            }
+
+            var8 = (int)(220.0F * var7) << 24 | 1052704;
+            drawRect(0, 0, var3, var4, var8);
+            GlStateManager.enableAlpha();
+            GlStateManager.enableDepth();
+            this.mc.mcProfiler.endSection();
+        }
+
+        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+        var11 = var3 / 2 - 91;
+
+        if (this.mc.thePlayer.isRidingHorse())
+        {
+            this.func_175186_a(var2, var11);
+        }
+        else if (this.mc.playerController.gameIsSurvivalOrAdventure())
+        {
+            this.func_175176_b(var2, var11);
+        }
+
+        if (this.mc.gameSettings.heldItemTooltips && !this.mc.playerController.enableEverythingIsScrewedUpMode())
+        {
+            this.func_175182_a(var2);
+        }
+        else if (this.mc.thePlayer.isSpectator())
+        {
+            this.field_175197_u.func_175263_a(var2);
+        }
+
+        if (this.mc.isDemo())
+        {
+            this.func_175185_b(var2);
+        }
+
+        if (this.mc.gameSettings.showDebugInfo)
+        {
+            this.overlayDebug.func_175237_a(var2);
+        }
+
+        int var9;
+
+        if (this.recordPlayingUpFor > 0)
+        {
+            this.mc.mcProfiler.startSection("overlayMessage");
+            var7 = (float)this.recordPlayingUpFor - p_175180_1_;
+            var8 = (int)(var7 * 255.0F / 20.0F);
+
+            if (var8 > 255)
+            {
+                var8 = 255;
+            }
+
+            if (var8 > 8)
+            {
+                GlStateManager.pushMatrix();
+                GlStateManager.translate((float)(var3 / 2), (float)(var4 - 68), 0.0F);
+                GlStateManager.enableBlend();
+                GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+                var9 = 16777215;
+
+                if (this.recordIsPlaying)
+                {
+                    var9 = Color.HSBtoRGB(var7 / 50.0F, 0.7F, 0.6F) & 16777215;
+                }
+
+                this.func_175179_f().drawString(this.recordPlaying, -this.func_175179_f().getStringWidth(this.recordPlaying) / 2, -4, var9 + (var8 << 24 & -16777216));
+                GlStateManager.disableBlend();
+                GlStateManager.popMatrix();
+            }
+
+            this.mc.mcProfiler.endSection();
+        }
+
+        if (this.field_175195_w > 0)
+        {
+            this.mc.mcProfiler.startSection("titleAndSubtitle");
+            var7 = (float)this.field_175195_w - p_175180_1_;
+            var8 = 255;
+
+            if (this.field_175195_w > this.field_175193_B + this.field_175192_A)
+            {
+                float var14 = (float)(this.field_175199_z + this.field_175192_A + this.field_175193_B) - var7;
+                var8 = (int)(var14 * 255.0F / (float)this.field_175199_z);
+            }
+
+            if (this.field_175195_w <= this.field_175193_B)
+            {
+                var8 = (int)(var7 * 255.0F / (float)this.field_175193_B);
+            }
+
+            var8 = MathHelper.clamp_int(var8, 0, 255);
+
+            if (var8 > 8)
+            {
+                GlStateManager.pushMatrix();
+                GlStateManager.translate((float)(var3 / 2), (float)(var4 / 2), 0.0F);
+                GlStateManager.enableBlend();
+                GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+                GlStateManager.pushMatrix();
+                GlStateManager.scale(4.0F, 4.0F, 4.0F);
+                var9 = var8 << 24 & -16777216;
+                this.func_175179_f().drawString(this.field_175201_x, (float)(-this.func_175179_f().getStringWidth(this.field_175201_x) / 2), -10.0F, 16777215 | var9, true);
+                GlStateManager.popMatrix();
+                GlStateManager.pushMatrix();
+                GlStateManager.scale(2.0F, 2.0F, 2.0F);
+                this.func_175179_f().drawString(this.field_175200_y, (float)(-this.func_175179_f().getStringWidth(this.field_175200_y) / 2), 5.0F, 16777215 | var9, true);
+                GlStateManager.popMatrix();
+                GlStateManager.disableBlend();
+                GlStateManager.popMatrix();
+            }
+
+            this.mc.mcProfiler.endSection();
+        }
+
+        Scoreboard var12 = this.mc.theWorld.getScoreboard();
+        ScoreObjective var13 = null;
+        ScorePlayerTeam var15 = var12.getPlayersTeam(this.mc.thePlayer.getName());
+
+        if (var15 != null)
+        {
+            int var10 = var15.func_178775_l().func_175746_b();
+
+            if (var10 >= 0)
+            {
+                var13 = var12.getObjectiveInDisplaySlot(3 + var10);
+            }
+        }
+
+        ScoreObjective var16 = var13 != null ? var13 : var12.getObjectiveInDisplaySlot(1);
+
+        if (var16 != null)
+        {
+            this.func_180475_a(var16, var2);
+            //TODO: Client
+        }else
+        {
