aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/overlay
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-07-06 17:24:20 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-07-06 17:24:20 -0400
commit98ee5a2ae8090c061b1e61e7955d793416991822 (patch)
treee34bb84ed247f08f2931f10d1dfbf6c8b883004c /src/main/java/com/thatgravyboat/skyblockhud/overlay
parentc04ca523f9fb9f7adefa74587db61f76deeae9f0 (diff)
downloadSkyblockHud-Death-Defied-98ee5a2ae8090c061b1e61e7955d793416991822.tar.gz
SkyblockHud-Death-Defied-98ee5a2ae8090c061b1e61e7955d793416991822.tar.bz2
SkyblockHud-Death-Defied-98ee5a2ae8090c061b1e61e7955d793416991822.zip
140?
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java87
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java14
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java154
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java50
4 files changed, 40 insertions, 265 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
index b4eb8db..462896d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/DungeonOverlay.java
@@ -67,13 +67,7 @@ public class DungeonOverlay extends Gui {
offset + (bossBarVisible ? 19 : 2),
(DungeonHandler.hasBloodkey() ? 0x55FF55 : 0xAA0000)
);
- drawString(
- font,
- DungeonHandler.getWitherKeys() + "x",
- (width / 2),
- offset + (bossBarVisible ? 30 : 13),
- 0x555555
- );
+ drawString(font, DungeonHandler.getWitherKeys() + "x", (width / 2), offset + (bossBarVisible ? 30 : 13), 0x555555);
//CLEARED PERCENTAGE
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(GuiTextures.overlay);
@@ -83,14 +77,7 @@ public class DungeonOverlay extends Gui {
(clearPercent <= 20 ? "4" : clearPercent <= 50 ? "6" : clearPercent <= 80 ? "e" : "a") +
clearPercent +
"%";
- drawTexturedModalRect(
- (width / 2) + 17,
- offset + (bossBarVisible ? 20 : 3),
- 2,
- 34,
- font.getStringWidth(clearPercentage) + 3,
- 14
- );
+ drawTexturedModalRect((width / 2) + 17, offset + (bossBarVisible ? 20 : 3), 2, 34, font.getStringWidth(clearPercentage) + 3, 14);
drawTexturedModalRect(
((width / 2) + 17) + font.getStringWidth(clearPercentage) + 3,
offset + (bossBarVisible ? 20 : 3),
@@ -106,22 +93,8 @@ public class DungeonOverlay extends Gui {
mc.renderEngine.bindTexture(GuiTextures.overlay);
int deaths = DungeonHandler.getDeaths();
String deathText = "Deaths: " + deaths;
- drawTexturedModalRect(
- (width / 2) + 17,
- offset + (bossBarVisible ? 35 : 18),
- 2,
- 34,
- font.getStringWidth(deathText) + 3,
- 14
- );
- drawTexturedModalRect(
- ((width / 2) + 17) + font.getStringWidth(deathText) + 3,
- offset + (bossBarVisible ? 35 : 18),
- 252,
- 34,
- 4,
- 14
- );
+ drawTexturedModalRect((width / 2) + 17, offset + (bossBarVisible ? 35 : 18), 2, 34, font.getStringWidth(deathText) + 3, 14);
+ drawTexturedModalRect(((width / 2) + 17) + font.getStringWidth(deathText) + 3, offset + (bossBarVisible ? 35 : 18), 252, 34, 4, 14);
drawString(font, deathText, (width / 2) + 18, offset + (bossBarVisible ? 38 : 21), 0xAAAAAA);
//SECRETS
@@ -131,14 +104,7 @@ public class DungeonOverlay extends Gui {
int secrets = DungeonHandler.getSecrets();
int totalSecrets = DungeonHandler.getTotalSecrets();
String secretsText = "Secrets: " + secrets + "/" + maxSecrets + " (" + totalSecrets + ")";
- drawTexturedModalRect(
- (width / 2) - 17 - (font.getStringWidth(secretsText)) - 4,
- offset + (bossBarVisible ? 20 : 3),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 17 - (font.getStringWidth(secretsText)) - 4, offset + (bossBarVisible ? 20 : 3), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 17 - (font.getStringWidth(secretsText))) - 2,
offset + (bossBarVisible ? 20 : 3),
@@ -147,27 +113,14 @@ public class DungeonOverlay extends Gui {
font.getStringWidth(secretsText) + 2,
14
);
- drawString(
- font,
- secretsText,
- (width / 2) - 17 - (font.getStringWidth(secretsText)),
- offset + (bossBarVisible ? 23 : 6),
- 0xAAAAAA
- );
+ drawString(font, secretsText, (width / 2) - 17 - (font.getStringWidth(secretsText)), offset + (bossBarVisible ? 23 : 6), 0xAAAAAA);
//CRYPTS
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(GuiTextures.overlay);
int crypts = DungeonHandler.getCrypts();
String cryptText = "Crypts: " + crypts;
- drawTexturedModalRect(
- (width / 2) - 17 - (font.getStringWidth(cryptText)) - 4,
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 17 - (font.getStringWidth(cryptText)) - 4, offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 17 - (font.getStringWidth(cryptText))) - 2,
offset + (bossBarVisible ? 35 : 18),
@@ -176,13 +129,7 @@ public class DungeonOverlay extends Gui {
font.getStringWidth(cryptText) + 2,
14
);
- drawString(
- font,
- cryptText,
- (width / 2) - 17 - (font.getStringWidth(cryptText)),
- offset + (bossBarVisible ? 38 : 21),
- 0xAAAAAA
- );
+ drawString(font, cryptText, (width / 2) - 17 - (font.getStringWidth(cryptText)), offset + (bossBarVisible ? 38 : 21), 0xAAAAAA);
}
public void drawUltimateBar(Minecraft mc, ScaledResolution resolution) {
@@ -217,8 +164,7 @@ public class DungeonOverlay extends Gui {
LocationHandler.getCurrentLocation().equals(Locations.CATACOMBS)
)
) {
- bossBarVisible =
- BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
+ bossBarVisible = BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
GlStateManager.enableBlend();
drawUltimateBar(mc, event.resolution);
@@ -245,21 +191,10 @@ public class DungeonOverlay extends Gui {
} catch (ArrayIndexOutOfBoundsException ignored) {
posY = 0;
}
- drawDungeonPlayer(
- player.getName(),
- player.getHealth(),
- player.isDead(),
- player.getDungeonClass(),
- posX,
- posY
- );
+ drawDungeonPlayer(player.getName(), player.getHealth(), player.isDead(), player.getDungeonClass(), posX, posY);
}
}
- drawDungeonClock(
- event.resolution.getScaledWidth(),
- SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34),
- mc
- );
+ drawDungeonClock(event.resolution.getScaledWidth(), SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
}
}
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
index b249362..439d857 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
@@ -25,12 +25,7 @@ public class GenericOverlays extends Gui {
Color color = new Color(percentage == max ? fullColor : loadingColor);
RenderUtils.drawTexturedModalRect(x, y, 0, 0, 182, 5);
- GlStateManager.color(
- color.getRed() / 255f,
- color.getGreen() / 255f,
- color.getBlue() / 255f,
- color.getAlpha() / 255f
- );
+ GlStateManager.color(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, color.getAlpha() / 255f);
RenderUtils.drawTexturedModalRect(x, y, 0, 30, 182, 5);
RenderUtils.drawTexturedModalRect(x, y, 0, 5, (int) (182 * percentage), 5);
if (barStyle != 0) {
@@ -54,12 +49,7 @@ public class GenericOverlays extends Gui {
Color color = new Color(percentage == max ? fullColor : loadingColor);
GlStateManager.enableBlend();
RenderUtils.drawTexturedModalRect(x, y, 0, 35, 62, 5);
- GlStateManager.color(
- color.getRed() / 255f,
- color.getGreen() / 255f,
- color.getBlue() / 255f,
- color.getAlpha() / 255f
- );
+ GlStateManager.color(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, color.getAlpha() / 255f);
RenderUtils.drawTexturedModalRect(x, y, 0, 65, 62, 5);
RenderUtils.drawTexturedModalRect(x, y, 0, 40, (int) (62 * percentage), 5);
if (barStyle != 0) {
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
index 5560ff7..530a890 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java
@@ -43,20 +43,10 @@ public class OverlayHud extends Gui {
String militaryTime = timeHour + ":" + (timeMin == 0 ? timeMin + "0" : timeMin);
int time12Hour = timeHour >= 12 ? timeHour - 12 : timeHour;
String normalTime =
- (time12Hour == 0 ? "00" : String.valueOf(time12Hour)) +
- ":" +
- (timeMin == 0 ? "00" : timeMin) +
- (timeHour >= 12 ? "pm" : "am");
+ (time12Hour == 0 ? "00" : String.valueOf(time12Hour)) + ":" + (timeMin == 0 ? "00" : timeMin) + (timeHour >= 12 ? "pm" : "am");
drawTexturedModalRect((width / 2) - 17, offset + (bossBarVisible ? 17 : 0), 0, 0, 34, 34);
- drawTexturedModalRect(
- (width / 2) - 4,
- offset + (bossBarVisible ? 24 : 7),
- (timeHour > 19 || timeHour < 4) ? 43 : 43 + 8,
- 0,
- 8,
- 8
- );
+ drawTexturedModalRect((width / 2) - 4, offset + (bossBarVisible ? 24 : 7), (timeHour > 19 || timeHour < 4) ? 43 : 43 + 8, 0, 8, 8);
if (SkyblockHud.config.main.twelveHourClock) drawScaledString(
0.8f,
width / 2,
@@ -94,10 +84,7 @@ public class OverlayHud extends Gui {
} else {
drawMithril(width, offset, mc);
}
- } else if (
- LocationHandler.getCurrentLocation().getCategory().equals(LocationCategory.PARK) &&
- ParkIslandHandler.isRaining()
- ) {
+ } else if (LocationHandler.getCurrentLocation().getCategory().equals(LocationCategory.PARK) && ParkIslandHandler.isRaining()) {
if (LocationHandler.getCurrentLocation().equals(Locations.HOWLINGCAVE)) {
drawSlayer(width, offset, mc);
} else drawRainDuration(width, offset, mc);
@@ -114,19 +101,9 @@ public class OverlayHud extends Gui {
mc.renderEngine.bindTexture(GuiTextures.overlay);
String dateText = SeasonDateHandler.getFancySeasonAndDate();
if (
- eventToggle &&
- !SeasonDateHandler.getCurrentEvent().isEmpty() &&
- !SeasonDateHandler.getCurrentEventTime().isEmpty()
- ) dateText =
- SeasonDateHandler.getCurrentEvent().trim() + " " + SeasonDateHandler.getCurrentEventTime().trim();
- drawTexturedModalRect(
- (width / 2) + 17,
- offset + (bossBarVisible ? 20 : 3),
- 2,
- 34,
- font.getStringWidth(dateText) + 9,
- 14
- );
+ eventToggle && !SeasonDateHandler.getCurrentEvent().isEmpty() && !SeasonDateHandler.getCurrentEventTime().isEmpty()
+ ) dateText = SeasonDateHandler.getCurrentEvent().trim() + " " + SeasonDateHandler.getCurrentEventTime().trim();
+ drawTexturedModalRect((width / 2) + 17, offset + (bossBarVisible ? 20 : 3), 2, 34, font.getStringWidth(dateText) + 9, 14);
drawTexturedModalRect(
((width / 2) + 17) + font.getStringWidth(dateText) + 9,
offset + (bossBarVisible ? 20 : 3),
@@ -233,13 +210,7 @@ public class OverlayHud extends Gui {
14
);
drawTexturedModalRect(xPos + 1, offset + (bossBarVisible ? 37 : 20), 75, 0, 8, 8);
- drawString(
- font,
- CurrencyHandler.getBitsFormatted(),
- xPos + 10,
- offset + (bossBarVisible ? 38 : 21),
- 0x55FFFF
- );
+ drawString(font, CurrencyHandler.getBitsFormatted(), xPos + 10, offset + (bossBarVisible ? 38 : 21), 0x55FFFF);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(GuiTextures.overlay);
xPos += font.getStringWidth(CurrencyHandler.getBitsFormatted()) + 11;
@@ -262,14 +233,7 @@ public class OverlayHud extends Gui {
) duration = flightFormat.format((double) IslandHandler.flightTime / 86400) + "day"; else duration =
flightFormat.format((double) IslandHandler.flightTime / 86400) + "days";
mc.renderEngine.bindTexture(GuiTextures.overlay);
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(duration))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -286,13 +250,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- duration,
- (width / 2) - 19 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 38 : 21),
- 0xFFFFFF
- );
+ drawString(font, duration, (width / 2) - 19 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 38 : 21), 0xFFFFFF);
}
}
@@ -301,14 +259,7 @@ public class OverlayHud extends Gui {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(GuiTextures.overlay);
String duration = "Rain: " + ParkIslandHandler.getRainTime();
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(duration))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -325,13 +276,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- duration,
- (width / 2) - 19 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 38 : 21),
- 0xFFFFFF
- );
+ drawString(font, duration, (width / 2) - 19 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 38 : 21), 0xFFFFFF);
}
}
@@ -366,14 +311,7 @@ public class OverlayHud extends Gui {
stringBuilder.append(maxKills);
}
String text = stringBuilder.toString();
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(text)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(text)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(text))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -390,13 +328,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- text,
- (width / 2) - 19 - (font.getStringWidth(text)),
- offset + (bossBarVisible ? 38 : 21),
- 0xFFFFFF
- );
+ drawString(font, text, (width / 2) - 19 - (font.getStringWidth(text)), offset + (bossBarVisible ? 38 : 21), 0xFFFFFF);
}
}
}
@@ -406,14 +338,7 @@ public class OverlayHud extends Gui {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
mc.renderEngine.bindTexture(GuiTextures.overlay);
String mithril = DwarvenMineHandler.getMithrilFormatted();
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(mithril)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(mithril)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(mithril))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -430,13 +355,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- mithril,
- (width / 2) - 19 - (font.getStringWidth(mithril)),
- offset + (bossBarVisible ? 38 : 21),
- 0x00C896
- );
+ drawString(font, mithril, (width / 2) - 19 - (font.getStringWidth(mithril)), offset + (bossBarVisible ? 38 : 21), 0x00C896);
}
}
@@ -447,14 +366,7 @@ public class OverlayHud extends Gui {
String duration = FarmingIslandHandler.location != Locations.NONE
? FarmingIslandHandler.location.getDisplayName()
: "" + FarmingIslandHandler.pelts;
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(duration))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -471,13 +383,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- duration,
- (width / 2) - 19 - (font.getStringWidth(duration)),
- offset + (bossBarVisible ? 38 : 21),
- 0xFFFFFF
- );
+ drawString(font, duration, (width / 2) - 19 - (font.getStringWidth(duration)), offset + (bossBarVisible ? 38 : 21), 0xFFFFFF);
}
}
@@ -520,14 +426,7 @@ public class OverlayHud extends Gui {
);
} else {
String text = DwarvenMineHandler.currentEvent.displayName;
- drawTexturedModalRect(
- (width / 2) - 33 - (font.getStringWidth(text)),
- offset + (bossBarVisible ? 35 : 18),
- 0,
- 34,
- 2,
- 14
- );
+ drawTexturedModalRect((width / 2) - 33 - (font.getStringWidth(text)), offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14);
drawTexturedModalRect(
((width / 2) - 33 - (font.getStringWidth(text))) + 2,
offset + (bossBarVisible ? 35 : 18),
@@ -544,13 +443,7 @@ public class OverlayHud extends Gui {
8,
8
);
- drawString(
- font,
- text,
- (width / 2) - 19 - (font.getStringWidth(text)),
- offset + (bossBarVisible ? 38 : 21),
- 0xFFFFFF
- );
+ drawString(font, text, (width / 2) - 19 - (font.getStringWidth(text)), offset + (bossBarVisible ? 38 : 21), 0xFFFFFF);
}
}
}
@@ -558,16 +451,11 @@ public class OverlayHud extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard())) {
- bossBarVisible =
- BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
+ bossBarVisible = BossStatus.statusBarTime > 0 && GuiIngameForge.renderBossHealth && BossbarHandler.bossBarRendered;
Minecraft mc = Minecraft.getMinecraft();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
if (LocationHandler.getCurrentLocation() != Locations.CATACOMBS) {
- drawClock(
- event.resolution.getScaledWidth(),
- SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34),
- mc
- );
+ drawClock(event.resolution.getScaledWidth(), SkyblockHud.config.main.mainHudPos.getAbsY(event.resolution, 34), mc);
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
index dce51a9..7c622e4 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java
@@ -53,24 +53,14 @@ public class RPGHud extends Gui {
@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
if (
- Utils.overlayShouldRender(
- event.type,
- SkyblockHud.hasSkyblockScoreboard(),
- SkyblockHud.config.renderer.hideXpBar
- )
+ Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.renderer.hideXpBar)
) MinecraftForge.EVENT_BUS.post(
new RenderGameOverlayEvent.Post(
new RenderGameOverlayEvent(event.partialTicks, event.resolution),
RenderGameOverlayEvent.ElementType.EXPERIENCE
)
);
- if (
- Utils.overlayShouldRender(
- event.type,
- SkyblockHud.hasSkyblockScoreboard(),
- SkyblockHud.config.rpg.showRpgHud
- )
- ) {
+ if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.rpg.showRpgHud)) {
Minecraft mc = Minecraft.getMinecraft();
GlStateManager.enableBlend();
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
@@ -90,35 +80,14 @@ public class RPGHud extends Gui {
drawTexturedModalRect(x, y, rightAligned ? 131 : 5, 6, 120, 47);
float manaWidth = Math.min(57 * ((float) mana / (float) maxMana), 57);
- drawTexturedModalRect(
- rightAligned ? x + 16 : 47 + x,
- 17 + y,
- rightAligned ? 199 : 0,
- 64,
- (int) manaWidth,
- 4
- );
+ drawTexturedModalRect(rightAligned ? x + 16 : 47 + x, 17 + y, rightAligned ? 199 : 0, 64, (int) manaWidth, 4);
float healthWidth = Math.min(70 * ((float) health / (float) maxHealth), 70);
- drawTexturedModalRect(
- rightAligned ? x + 3 : 47 + x,
- 22 + y,
- rightAligned ? 186 : 0,
- 68,
- (int) healthWidth,
- 5
- );
+ drawTexturedModalRect(rightAligned ? x + 3 : 47 + x, 22 + y, rightAligned ? 186 : 0, 68, (int) healthWidth, 5);
if (health > maxHealth) {
float absorptionWidth = Math.min(70 * ((float) (health - maxHealth) / (float) maxHealth), 70);
- drawTexturedModalRect(
- rightAligned ? x + 3 : 47 + x,
- 22 + y,
- rightAligned ? 186 : 0,
- 77,
- (int) absorptionWidth,
- 5
- );
+ drawTexturedModalRect(rightAligned ? x + 3 : 47 + x, 22 + y, rightAligned ? 186 : 0, 77, (int) absorptionWidth, 5);
}
float xpWidth = 67 * mc.thePlayer.experience;
@@ -129,14 +98,7 @@ public class RPGHud extends Gui {
if (mc.thePlayer.getAir() < 300) {
float airWidth = 60 * ((float) mc.thePlayer.getAir() / 300);
drawTexturedModalRect(rightAligned ? x + 17 : 39 + x, 33 + y, rightAligned ? 192 : 0, 82, 64, 6);
- drawTexturedModalRect(
- rightAligned ? x + 19 : 41 + x,
- 33 + y,
- rightAligned ? 196 : 0,
- 88,
- (int) airWidth,
- 4
- );
+ drawTexturedModalRect(rightAligned ? x + 19 : 41 + x, 33 + y, rightAligned ? 196 : 0, 88, (int) airWidth, 4);
}
GlStateManager.scale(0.75f, 0.75f, 1);
drawCenteredString(