diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-07 21:52:37 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-07 21:52:37 -0230 |
commit | 36a66e436ef3c5a3aa2deda0e1538db072ca7f71 (patch) | |
tree | 32a3a104464da3ef8ee743ecfe241d1320ad25c9 /src/main/java/com/thatgravyboat/skyblockhud/overlay | |
parent | 93248d28d6b314b42f6b0d82164975343b214ece (diff) | |
download | SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.gz SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.bz2 SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.zip |
Added Alpha Crystal Hollows locations to get ahead of the update and added commands for people to help me with deving.
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java index d6a9709..ee23b7e 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/RPGHud.java @@ -5,8 +5,6 @@ import com.thatgravyboat.skyblockhud.GuiTextures; import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.Utils; import com.thatgravyboat.skyblockhud.core.config.Position; -import java.text.DecimalFormat; -import java.text.NumberFormat; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -15,6 +13,9 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import java.text.DecimalFormat; +import java.text.NumberFormat; + public class RPGHud extends Gui { private static int mana, maxMana, overflow = 0; @@ -83,22 +84,19 @@ public class RPGHud extends Gui { drawTexturedModalRect(rightAligned ? x + 3 : 47 + x, 22 + y, rightAligned ? 186 : 0, 77, (int) absorptionWidth, 5); } - float xpWidth = 67 * mc.thePlayer.experience; - drawTexturedModalRect(rightAligned ? x + 7 : 45 + x, 28 + y, rightAligned ? 189 : 0, 73, (int) xpWidth, 4); + drawTexturedModalRect(rightAligned ? x + 7 : 45 + x, 28 + y, rightAligned ? 189 : 0, 73, Utils.lerp(mc.thePlayer.experience, 0, 67), 4); //Air in water NumberFormat myFormat = NumberFormat.getInstance(); myFormat.setGroupingUsed(true); 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, Utils.lerp(mc.thePlayer.getAir() / 300f, 0, 60), 4); } - GlStateManager.scale(0.75f, 0.75f, 1); - 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, true); - GlStateManager.scale(1 / 0.75f, 1 / 0.75f, 1); + + Utils.drawStringScaled("" + mc.thePlayer.experienceLevel, mc.fontRendererObj, (rightAligned ? 130 : 14) + x - (mc.fontRendererObj.getStringWidth("" + mc.thePlayer.experienceLevel) / 2f), 34 + y, false, 8453920, 0.75f); + + Utils.drawStringScaled(ChatFormatting.RED + " \u2764 " + health + "/" + maxHealth, mc.fontRendererObj, (rightAligned ? 10 : 42) + x, 8 + y, true, 0xffffff, 0.75f); + GlStateManager.color(255, 255, 255); GlStateManager.disableBlend(); } |