diff options
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)); + } } } } |