aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-18 05:27:24 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-18 05:27:24 -0230
commit5559861e52a788f08bc48946a9aad6dd52b373bf (patch)
treef4caac982db914fca97527f8783d26d6703bec64 /src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
parentbaf3b8aa15cbd2dc0fcb4a80707557c44ee30c16 (diff)
downloadSkyblockHud-Death-Defied-5559861e52a788f08bc48946a9aad6dd52b373bf.tar.gz
SkyblockHud-Death-Defied-5559861e52a788f08bc48946a9aad6dd52b373bf.tar.bz2
SkyblockHud-Death-Defied-5559861e52a788f08bc48946a9aad6dd52b373bf.zip
Added texture styles
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
index 880e2ea..daf3ec0 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/GenericOverlays.java
@@ -2,21 +2,17 @@ package com.thatgravyboat.skyblockhud.overlay;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.core.util.render.RenderUtils;
+import com.thatgravyboat.skyblockhud.textures.Textures;
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()) {
- updateBar();
- mc.renderEngine.bindTexture(bars);
+ mc.renderEngine.bindTexture(Textures.texture.bars);
Color color = new Color(percentage == max ? fullColor : loadingColor);
RenderUtils.drawTexturedModalRect(x, y, 0, 0, 182, 5);
@@ -31,8 +27,7 @@ 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()) {
- updateBar();
- mc.renderEngine.bindTexture(bars);
+ mc.renderEngine.bindTexture(Textures.texture.bars);
Color color = new Color(percentage == max ? fullColor : loadingColor);
GlStateManager.enableBlend();
RenderUtils.drawTexturedModalRect(x, y, 0, 35, 62, 5);
@@ -44,11 +39,4 @@ 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");
- }
- }
}