diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-13 20:25:33 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-13 20:25:33 +0100 |
commit | a35b093c39c9dce7697d1daacecab199a44c9f40 (patch) | |
tree | 4c8a5b86e0ab38b898c28c49ba6509294070f006 /src/main/java/at/hannibal2/skyhanni/features/mobs | |
parent | 5a75b69da9f8b1cfa7705c6d6b9850d72b5a0ab6 (diff) | |
download | skyhanni-a35b093c39c9dce7697d1daacecab199a44c9f40.tar.gz skyhanni-a35b093c39c9dce7697d1daacecab199a44c9f40.tar.bz2 skyhanni-a35b093c39c9dce7697d1daacecab199a44c9f40.zip |
Show the time it takes to kill the Slayer boss.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mobs')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mobs/AreaMiniBossFeatures.kt | 10 |
1 files changed, 3 insertions, 7 deletions
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 |