aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-07-11 21:28:26 +0000
committerGitHub Action <actions@github.com>2021-07-11 21:28:26 +0000
commite616a0910bdf7f4540f2814a35c1b7eefa9cd59d (patch)
treee1ec5d961ef3a0b2337f9794176b3fac3ae299d2 /src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
parent3a1917c8a0af4157cc1e6d5f3986e89377f245d8 (diff)
downloadskyblockhud-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.tar.gz
skyblockhud-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.tar.bz2
skyblockhud-e616a0910bdf7f4540f2814a35c1b7eefa9cd59d.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
index 57044df..273f98d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/MiningHud.java
@@ -14,12 +14,12 @@ public class MiningHud extends Gui {
private static int fuel, maxFuel;
private static int heat;
- public static void setFuel(int fuel, int maxFuel){
+ public static void setFuel(int fuel, int maxFuel) {
MiningHud.fuel = fuel;
MiningHud.maxFuel = maxFuel;
}
- public static void setHeat(int heat){
+ public static void setHeat(int heat) {
MiningHud.heat = heat;
}
@@ -31,30 +31,30 @@ public class MiningHud extends Gui {
if (heat > 0 && Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.miningHud.showDrillBar && SkyblockHud.config.miningHud.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.miningHud.showDrillBar) {
+ } else if (Utils.isDrill(mc.thePlayer.getHeldItem()) && SkyblockHud.config.miningHud.showDrillBar) {
renderFuelBar(mc, (event.resolution.getScaledWidth() / 2) - 68, event.resolution.getScaledHeight() - 31);
- }else if (heat > 0 && SkyblockHud.config.miningHud.showHeatBar){
+ } else if (heat > 0 && SkyblockHud.config.miningHud.showHeatBar) {
renderHeatBar(mc, (event.resolution.getScaledWidth() / 2) - 22, event.resolution.getScaledHeight() - 31);
}
}
}
- private void renderFuelBar(Minecraft mc, int x, int y){
- if (maxFuel == 0)return;
+ private void renderFuelBar(Minecraft mc, int x, int y) {
+ if (maxFuel == 0) return;
GlStateManager.enableBlend();
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
mc.renderEngine.bindTexture(GuiTextures.mining);
drawTexturedModalRect(x, y, 0, 0, 136, 7);
- drawTexturedModalRect(x, y, 0, 7, Utils.lerp((float)fuel/(float)maxFuel,0,136), 7);
- String percentageText = Math.round(((float)fuel/(float)maxFuel)*100) +"%";
- this.drawCenteredString(mc.fontRendererObj, percentageText, x + 68, y-2, 0xffffff);
+ drawTexturedModalRect(x, y, 0, 7, Utils.lerp((float) fuel / (float) maxFuel, 0, 136), 7);
+ String percentageText = Math.round(((float) fuel / (float) maxFuel) * 100) + "%";
+ this.drawCenteredString(mc.fontRendererObj, percentageText, x + 68, y - 2, 0xffffff);
}
- private void renderHeatBar(Minecraft mc, int x, int y){
+ private void renderHeatBar(Minecraft mc, int x, int y) {
GlStateManager.enableBlend();
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
mc.renderEngine.bindTexture(GuiTextures.mining);
drawTexturedModalRect(x, y, 137, 0, 45, 7);
- drawTexturedModalRect(x, y, 137, 7, Utils.lerp(heat/100f,0,45), 7);
+ drawTexturedModalRect(x, y, 137, 7, Utils.lerp(heat / 100f, 0, 45), 7);
}
}