diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-13 01:51:19 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-13 01:51:19 -0230 |
commit | 3bd212839e1d3c497a840221a0c149451967467e (patch) | |
tree | 9a306491b76808a17a26c6bef6f74c08cbc99964 /src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java | |
parent | 087d97fb0663edc5e343187c0fa4ec1bc6b081bc (diff) | |
download | skyblockhud-3bd212839e1d3c497a840221a0c149451967467e.tar.gz skyblockhud-3bd212839e1d3c497a840221a0c149451967467e.tar.bz2 skyblockhud-3bd212839e1d3c497a840221a0c149451967467e.zip |
Added 2 new subcommands to crystal waypoints, Added medals shown in farmhouse, Added config option to stop auto flipping of rpg hud, Added option so if exp bar is still being rendered it should hide when holding drill to not overlay them and keep a consistent hud
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java index a1e1f54..8c64ddd 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java @@ -60,6 +60,9 @@ public class OverlayHud extends Gui { // LOCATION drawLocation(width, offset, mc); + //FARMHOUSE + drawFarmHouseMedals(width, offset, mc); + //EXTRA SLOT if (LocationHandler.getCurrentLocation().equals(Locations.YOURISLAND)) { if (IslandHandler.flightTime > 0) drawFlightDuration(width, offset, mc); @@ -273,6 +276,24 @@ public class OverlayHud extends Gui { } } + public void drawFarmHouseMedals(int width, int offset, Minecraft mc) { + if (LocationHandler.getCurrentLocation().equals(Locations.FARMHOUSE)) { + int bronze = font.getStringWidth(FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.BRONZE)); + int silver = font.getStringWidth(FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.SILVER)); + int gold = font.getStringWidth(FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.GOLD)); + + int end = drawLeftBottomBar(width, offset, 40 + bronze + silver + gold, mc); + drawTexturedModalRect(end + 2, offset + (bossBarVisible ? 38 : 21), 139, 0, 8, 8); + drawTexturedModalRect(end + 14 + gold, offset + (bossBarVisible ? 38 : 21), 147, 0, 8, 8); + drawTexturedModalRect(end + 26 + gold + silver, offset + (bossBarVisible ? 38 : 21), 155, 0, 8, 8); + + drawString(font, FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.GOLD), end + 12, offset + (bossBarVisible ? 38 : 21), 0xffffff); + drawString(font, FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.SILVER), end + gold + 24, offset + (bossBarVisible ? 38 : 21), 0xffffff); + drawString(font, FarmHouseHandler.getFormattedMedals(FarmHouseHandler.Medal.BRONZE), end + gold + silver + 36, offset + (bossBarVisible ? 38 : 21), 0xffffff); + + } + } + @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent.Post event) { if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard())) { @@ -291,4 +312,15 @@ public class OverlayHud extends Gui { drawCenteredString(font, text, (int) (x / factor), (int) (y / factor), color); GlStateManager.scale(1 / factor, 1 / factor, 1); } + + + public int drawLeftBottomBar(int width, int offset, int barWidth, Minecraft mc) { + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + mc.renderEngine.bindTexture(GuiTextures.overlay); + int edge = (width / 2) - 17; + + drawTexturedModalRect(edge - barWidth, offset + (bossBarVisible ? 35 : 18), 0, 34, 2, 14); + drawTexturedModalRect(edge - barWidth + 2, offset + (bossBarVisible ? 35 : 18), 2, 34, barWidth - 2, 14); + return edge - barWidth + 2; + } } |