diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-06 18:18:26 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-06 18:18:26 -0230 |
commit | 002dfdd18b908bda3e784dd303c15bbef79cdd2e (patch) | |
tree | 0c732879b7a851a4782205c2da5027944eb69acf /src/main/java/com/thatgravyboat/skyblockhud/overlay | |
parent | a4131a48e58cf55587d1ea1838e1ff2a5d692080 (diff) | |
download | SkyblockHud-Death-Defied-002dfdd18b908bda3e784dd303c15bbef79cdd2e.tar.gz SkyblockHud-Death-Defied-002dfdd18b908bda3e784dd303c15bbef79cdd2e.tar.bz2 SkyblockHud-Death-Defied-002dfdd18b908bda3e784dd303c15bbef79cdd2e.zip |
Switched SlayerHandler to use regex instead of .replace and .split
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java index 06cf94a..9356be6 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java @@ -69,8 +69,10 @@ public class RPGHud extends Gui { boolean rightAligned = position.rightAligned(event.resolution, 120); 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); + 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); @@ -93,7 +95,7 @@ public class RPGHud extends Gui { drawCenteredString(mc.fontRendererObj, ""+mc.thePlayer.experienceLevel, (rightAligned ? 130 : 0) + (int)(15+ x/0.75f), (int)(45+ y/0.75f), 8453920); GlStateManager.scale(1/0.75f, 1/0.75f, 1); GlStateManager.scale(0.75f, 0.75f, 1); - font.drawString( ChatFormatting.RED + " \u2764 " + health +"/"+maxHealth,(rightAligned ? -40 : 0) + (int)(64+ x/0.75f), (int)(8+ y/0.75f), 0xffffff, false); + font.drawString( ChatFormatting.RED + " \u2764 " + health +"/"+maxHealth,(rightAligned ? -40 : 0) + (int)(64+ x/0.75f), (int)(8+ y/0.75f), 0xffffff, true); GlStateManager.scale(1/0.75f, 1/0.75f, 1); GlStateManager.color(255,255,255); GlStateManager.disableBlend(); |