aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/overlay
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-15 01:36:50 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-15 01:36:50 -0230
commit718740e85f48b57bf712a62f811cd4d34dd98450 (patch)
tree8d3c7751cf684fe98e513010233f7b7b46e3e351 /src/main/java/com/thatgravyboat/skyblockhud/overlay
parent89fa98d85546eb93064ce4a2b66e79341750b577 (diff)
downloadSkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.tar.gz
SkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.tar.bz2
SkyblockHud-Death-Defied-718740e85f48b57bf712a62f811cd4d34dd98450.zip
Updated important locations
Updated Config System (Thanks Moulberry) Added Trackers Back with kill trackers
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
index eeb48e1..fc918db 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
@@ -1,18 +1,22 @@
package com.thatgravyboat.skyblockhud.overlay;
-import com.thatgravyboat.skyblockhud.GuiTextures;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.core.util.render.RenderUtils;
-import java.awt.Color;
+import java.awt.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.util.ResourceLocation;
public class GenericOverlays extends Gui {
+ public static int lastBar = 0;
+ public static ResourceLocation bars = new ResourceLocation("skyblockhud", "bars.png");
+
public static void drawLargeBar(Minecraft mc, int x, int y, float percentage, float max, int fullColor, int loadingColor, int barStyle) {
if (SkyblockHud.hasSkyblockScoreboard()) {
- mc.renderEngine.bindTexture(GuiTextures.bars);
+ updateBar();
+ mc.renderEngine.bindTexture(bars);
Color color = new Color(percentage == max ? fullColor : loadingColor);
RenderUtils.drawTexturedModalRect(x, y, 0, 0, 182, 5);
@@ -27,7 +31,8 @@ public class GenericOverlays extends Gui {
public static void drawSmallBar(Minecraft mc, int x, int y, double percentage, double max, int fullColor, int loadingColor, int barStyle) {
if (SkyblockHud.hasSkyblockScoreboard()) {
- mc.renderEngine.bindTexture(GuiTextures.bars);
+ updateBar();
+ mc.renderEngine.bindTexture(bars);;
Color color = new Color(percentage == max ? fullColor : loadingColor);
GlStateManager.enableBlend();
RenderUtils.drawTexturedModalRect(x, y, 0, 35, 62, 5);
@@ -39,4 +44,13 @@ public class GenericOverlays extends Gui {
}
}
}
+
+ public static void updateBar() {
+ if (lastBar != SkyblockHud.config.misc.barTexture) {
+ lastBar = SkyblockHud.config.misc.barTexture;
+ if (lastBar == 0) bars = new ResourceLocation("skyblockhud", "bars.png");
+ else bars = new ResourceLocation("skyblockhud", "bars_"+lastBar+".png");
+ }
+
+ }
}