summaryrefslogtreecommitdiff
path: root/java/darkknight/jewelrycraft/events/ScreenHandler.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:25:27 +0000
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:25:27 +0000
commite86949a1ad3269ec66c9de65e2c92f5e66251411 (patch)
treeabe7a3b14d7a5f7bb27a916a991f8911de94c1d2 /java/darkknight/jewelrycraft/events/ScreenHandler.java
parent12cb40ba14e76b999a381b1f122bfce73223fd38 (diff)
More stuff. I don't even know by this point....
Diffstat (limited to 'java/darkknight/jewelrycraft/events/ScreenHandler.java')
-rw-r--r--java/darkknight/jewelrycraft/events/ScreenHandler.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/darkknight/jewelrycraft/events/ScreenHandler.java b/java/darkknight/jewelrycraft/events/ScreenHandler.java
index 9364e88..7121f3e 100644
--- a/java/darkknight/jewelrycraft/events/ScreenHandler.java
+++ b/java/darkknight/jewelrycraft/events/ScreenHandler.java
@@ -17,7 +17,7 @@ import darkknight.jewelrycraft.curses.Curse;
public class ScreenHandler extends Gui
{
private Minecraft mc;
- public static NBTTagCompound tagCache;
+ public static NBTTagCompound tagCache = null;
public static int cooldown;
static ResourceLocation texture;
static ResourceLocation hearts = new ResourceLocation("jewelrycraft", "textures/gui/hearts.png");
@@ -32,6 +32,7 @@ public class ScreenHandler extends Gui
@SubscribeEvent
public void renderScreen(RenderGameOverlayEvent event)
{
+// if (event.type != ElementType.TEXT) Gui.drawRect(0, 0, mc.displayWidth, mc.displayHeight, 0xff000000);
if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return;
if (!mc.gameSettings.showDebugInfo && !(mc.currentScreen instanceof GuiChat)){
int count = 0;
@@ -76,8 +77,11 @@ public class ScreenHandler extends Gui
count++;
}
}
+ GL11.glPushMatrix();
+ GL11.glColor4f(1f, 1f, 1f, 1.0f);
mc.renderEngine.bindTexture(hearts);
count = 0;
+ size = 16;
if (tagCache.getFloat("BlueHeart") > 0){
for(int i = 0; i < (int)tagCache.getFloat("BlueHeart") / 2; i++)
drawTexturedModalRect(2 + 13 * i, resolution.getScaledHeight() / 2 - 25 + 16 * count, 0 * size, 0 * size, size, size);
@@ -92,6 +96,7 @@ public class ScreenHandler extends Gui
count++;
if (tagCache.getFloat("WhiteHeart") > 0)
drawTexturedModalRect(2, resolution.getScaledHeight() / 2 - 25 + 16 * count, 2 * size, 1 * size, size, size);
+ GL11.glPopMatrix();
}
}
} \ No newline at end of file