diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-16 03:25:03 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-16 03:25:03 -0230 |
commit | 7f0d5d804ff8b327e7f5bc522a2732025dd39545 (patch) | |
tree | 73d7088d90a2a4d5141ca6363c5c4c0a12e237e5 /src/main/java/com/thatgravyboat/skyblockhud/overlay | |
parent | 6bebc34cac85722ba7462c37a09b378403344f51 (diff) | |
download | SkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.tar.gz SkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.tar.bz2 SkyblockHud-Death-Defied-7f0d5d804ff8b327e7f5bc522a2732025dd39545.zip |
Added mining bar mode for moveable or static
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java index 2c2feaa..5a2f148 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java @@ -3,6 +3,7 @@ package com.thatgravyboat.skyblockhud.overlay; import com.thatgravyboat.skyblockhud.GuiTextures; import com.thatgravyboat.skyblockhud.SkyblockHud; import com.thatgravyboat.skyblockhud.Utils; +import com.thatgravyboat.skyblockhud.core.config.Position; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.renderer.GlStateManager; @@ -32,13 +33,24 @@ public class MiningHud extends Gui { if (Utils.overlayShouldRender(event.type, SkyblockHud.hasSkyblockScoreboard(), SkyblockHud.config.mining.showDrillBar || SkyblockHud.config.mining.showHeatBar)) { Minecraft mc = Minecraft.getMinecraft(); - if (heat > 0 && Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar && SkyblockHud.config.mining.showHeatBar) { - renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 91, event.resolution.getScaledHeight() - 31); - renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) + 46, event.resolution.getScaledHeight() - 31); - } else if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar) { - renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 68, event.resolution.getScaledHeight() - 31); - } else if (heat > 0 && SkyblockHud.config.mining.showHeatBar) { - renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) - 22, event.resolution.getScaledHeight() - 31); + if (SkyblockHud.config.mining.barMode == 1) { + if (heat > 0 && Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar && SkyblockHud.config.mining.showHeatBar) { + renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 91, event.resolution.getScaledHeight() - 31); + renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) + 46, event.resolution.getScaledHeight() - 31); + } else if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar) { + renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 68, event.resolution.getScaledHeight() - 31); + } else if (heat > 0 && SkyblockHud.config.mining.showHeatBar) { + renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) - 22, event.resolution.getScaledHeight() - 31); + } + }else if (SkyblockHud.config.mining.barMode == 0) { + if (heat > 0 && SkyblockHud.config.mining.showHeatBar){ + Position position = SkyblockHud.config.mining.heatBar; + renderHeatBar(mc, position.getAbsX(event.resolution, 45), position.getAbsY(event.resolution, 7)); + } + if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.mining.showDrillBar){ + Position position = SkyblockHud.config.mining.drillBar; + renderFuelBar(mc, position.getAbsX(event.resolution, 136), position.getAbsY(event.resolution, 7)); + } } } } |