From a35b093c39c9dce7697d1daacecab199a44c9f40 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:25:33 +0100 Subject: Show the time it takes to kill the Slayer boss. --- .../hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/mobs') diff --git a/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt index 163563981..09f125dbf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt @@ -4,12 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth -import at.hannibal2.skyhanni.utils.LocationUtils -import at.hannibal2.skyhanni.utils.LorenzColor -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.LorenzUtils.round -import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import net.minecraft.entity.EntityLiving import net.minecraft.entity.monster.EntityBlaze @@ -70,8 +66,8 @@ class AreaMiniBossFeatures { private fun AreaMiniBossType.getTime(): String { val duration = System.currentTimeMillis() - lastTime val estimatedTime = respawnCooldown - duration % respawnCooldown - val double = (estimatedTime.toDouble() / 1000).round(1) - return color.getChatColor() + "" + LorenzUtils.formatDouble(double, "0.0") + "s" + val format = TimeUtils.formatDuration(estimatedTime, showMilliSeconds = true) + return color.getChatColor() + format } @SubscribeEvent -- cgit