From 20bef6e26d948698398bd16aeab8c9e6b89110e4 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 22 Aug 2019 20:01:40 -0400 Subject: Format/import cleanup --- .../jewelrycraft/events/ScreenHandler.java | 96 +++++++--------------- 1 file changed, 28 insertions(+), 68 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java') diff --git a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java index 9df771d..a46f45b 100755 --- a/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java +++ b/src/main/java/darkknight/jewelrycraft/events/ScreenHandler.java @@ -13,9 +13,9 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; public class ScreenHandler extends Gui { - private Minecraft mc; - public static NBTTagCompound tagCache = null; - public static int cooldown; + private Minecraft mc; + public static NBTTagCompound tagCache = null; + public static int cooldown; public ScreenHandler(Minecraft mc) { super(); @@ -24,92 +24,52 @@ public class ScreenHandler extends Gui { @SubscribeEvent public void renderScreen(RenderGameOverlayEvent event) { - if (event.isCancelable() || event.type != ElementType.ALL - || tagCache == null) + if (event.isCancelable() || event.type != ElementType.ALL || tagCache == null) return; int count = 0; int size = 32; - ScaledResolution resolution = new ScaledResolution(mc, - mc.displayWidth, mc.displayHeight); + ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); GL11.glPushMatrix(); GL11.glColor4f(1f, 1f, 1f, 1.0f); mc.renderEngine.bindTexture(Variables.MISC_TEXTURE); count = 0; size = 16; if (tagCache.getFloat("BlueHeart") > 0) { - drawTexturedModalRect( - resolution.getScaledWidth() / 2 - + 90 + 35 * count, - resolution.getScaledHeight() - 40, + drawTexturedModalRect(resolution.getScaledWidth() / 2 + 90 + 35 * count, resolution.getScaledHeight() - 40, 0 * size, 0 * size, size, size); - mc.fontRenderer.drawStringWithShadow("x" - + (MathHelper.ceiling_float_int( - tagCache.getFloat( - "BlueHeart")) - / 2.0F), - resolution.getScaledWidth() / 2 - + 105 + 35 * count, - resolution.getScaledHeight() - 36, - 16777215); + mc.fontRenderer.drawStringWithShadow( + "x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F), + resolution.getScaledWidth() / 2 + 105 + 35 * count, resolution.getScaledHeight() - 36, 16777215); } count++; mc.renderEngine.bindTexture(Variables.MISC_TEXTURE); if (tagCache.getFloat("BlackHeart") > 0) { - drawTexturedModalRect(resolution.getScaledWidth() - / 2 - + 90 + drawTexturedModalRect(resolution.getScaledWidth() / 2 + 90 + (mc.fontRenderer.getStringWidth( - String.valueOf((MathHelper - .ceiling_float_int( - tagCache.getFloat( - "BlueHeart")) - / 2.0F))) - - 14) - + 35 * count, - resolution.getScaledHeight() - 40, - 1 * size, 0 * size, size, size); - mc.fontRenderer.drawStringWithShadow("x" - + (MathHelper.ceiling_float_int( - tagCache.getFloat( - "BlackHeart")) - / 2.0F), - resolution.getScaledWidth() / 2 - + 105 - + (mc.fontRenderer - .getStringWidth(String - .valueOf((MathHelper - .ceiling_float_int( - tagCache.getFloat( - "BlueHeart")) - / 2.0F))) + String.valueOf((MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F))) - 14) + + 35 * count, resolution.getScaledHeight() - 40, 1 * size, 0 * size, size, size); + mc.fontRenderer.drawStringWithShadow( + "x" + (MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F), + resolution.getScaledWidth() / 2 + 105 + + (mc.fontRenderer.getStringWidth(String + .valueOf((MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F))) - 14) + 35 * count, - resolution.getScaledHeight() - 36, - 16777215); + resolution.getScaledHeight() - 36, 16777215); } count++; mc.renderEngine.bindTexture(Variables.MISC_TEXTURE); if (tagCache.getFloat("WhiteHeart") > 0) - drawTexturedModalRect(resolution.getScaledWidth() - / 2 - + 90 - + (mc.fontRenderer.getStringWidth( - String.valueOf((MathHelper - .ceiling_float_int( - tagCache.getFloat( - "BlueHeart")) - / 2.0F))) - - 14) - + (mc.fontRenderer.getStringWidth( - String.valueOf((MathHelper - .ceiling_float_int( - tagCache.getFloat( - "BlackHeart")) - / 2.0F))) - - 14) - + 35 * count, - resolution.getScaledHeight() - 40, - 2 * size, 1 * size, size, size); + drawTexturedModalRect( + resolution.getScaledWidth() / 2 + 90 + + (mc.fontRenderer.getStringWidth(String + .valueOf((MathHelper.ceiling_float_int(tagCache.getFloat("BlueHeart")) / 2.0F))) + - 14) + + (mc.fontRenderer.getStringWidth(String + .valueOf((MathHelper.ceiling_float_int(tagCache.getFloat("BlackHeart")) / 2.0F))) + - 14) + + 35 * count, + resolution.getScaledHeight() - 40, 2 * size, 1 * size, size, size); GL11.glPopMatrix(); } } \ No newline at end of file -- cgit v1.2.3