From d60a1e3fa81abcaf72b854a59a5475352496f6ec Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 18:21:24 -0500 Subject: Only show bonzo cooldown if they are wearing the bonzo mask --- src/main/java/me/Danker/DankersSkyblockMod.java | 37 ++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 153a6ca..7acf51d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1362,23 +1362,28 @@ public class DankersSkyblockMod } if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { - double scale = ScaleCommand.bonzoTimerScale; - double scaleReset = Math.pow(scale, -1); - GL11.glScaled(scale, scale, scale); - - double timeNow = System.currentTimeMillis() / 1000; - mc.getTextureManager().bindTexture(BONZO_ICON); - Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); - - String bonzoText; - if (nextBonzoUse - timeNow < 0) { - bonzoText = EnumChatFormatting.GREEN + "READY"; - } else { - bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); - } - new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); - GL11.glScaled(scaleReset, scaleReset, scaleReset); + ItemStack helmetSlot = mc.thePlayer.getCurrentArmor(3); + if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Bonzo's Mask")) || nextBonzoUse > 0) { + + double scale = ScaleCommand.bonzoTimerScale; + double scaleReset = Math.pow(scale, -1); + GL11.glScaled(scale, scale, scale); + + double timeNow = System.currentTimeMillis() / 1000; + mc.getTextureManager().bindTexture(BONZO_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); + + String bonzoText; + if (nextBonzoUse - timeNow < 0) { + bonzoText = EnumChatFormatting.GREEN + "READY"; + } else { + bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); + } + new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); + + GL11.glScaled(scaleReset, scaleReset, scaleReset); + } } if (showSkillTracker && Utils.inSkyblock) { -- cgit