From f2e7412924773d01a8ad96e8b642a7d5deb9ae90 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 30 Sep 2022 00:57:29 +0200 Subject: fixed barbarian duke --- .../features/damageindicator/DamageIndicatorManager.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt index ec7c23ed1..d8daab906 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt @@ -90,11 +90,8 @@ class DamageIndicatorManager { //TODO config to define between 100ms and 5 sec for (uuid in data.filter { - (System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead && !noDeathDisplay(it.value.bossType)) 4_000 else 100) || - (it.value.dead && noDeathDisplay(it.value.bossType)) - } - .map { it.key }) { - data.remove(uuid) + val waitForRemoval = if (it.value.dead && !noDeathDisplay(it.value.bossType)) 4_000 else 100 + (System.currentTimeMillis() > it.value.timeLastTick + waitForRemoval) || (it.value.dead && noDeathDisplay(it.value.bossType)) }.map { it.key }) { data.remove(uuid) } var playerLocation = LocationUtils.playerLocation() @@ -145,7 +142,9 @@ class DamageIndicatorManager { RenderUtils.drawLabel(location, healthText, partialTicks, true, 6f) if (data.nameAbove.isNotEmpty()) { - RenderUtils.drawLabel(location, data.nameAbove, partialTicks, true, 3.9f, if (tooClose) -9.0f else -18.0f) + RenderUtils.drawLabel( + location, data.nameAbove, partialTicks, true, 3.9f, if (tooClose) -9.0f else -18.0f + ) } if (tooClose) continue @@ -372,7 +371,7 @@ class DamageIndicatorManager { BossType.NETHER_BARBARIAN_DUKE, -> { val location = entity.getLorenzVec() - entityData.ignoreBlocks = location.y == 117.0 + entityData.ignoreBlocks = location.y == 117.0 && location.distance(LocationUtils.playerLocation()) < 15 } else -> return "" -- cgit