diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 00:57:29 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 00:57:29 +0200 |
commit | f2e7412924773d01a8ad96e8b642a7d5deb9ae90 (patch) | |
tree | 9c62e43903c97c4b354708eaa0873e6263965f1c /src/main/java/at/hannibal2 | |
parent | 20a1a8fc9d51c4125d9d979041f4aac1ff3bb76b (diff) | |
download | skyhanni-f2e7412924773d01a8ad96e8b642a7d5deb9ae90.tar.gz skyhanni-f2e7412924773d01a8ad96e8b642a7d5deb9ae90.tar.bz2 skyhanni-f2e7412924773d01a8ad96e8b642a7d5deb9ae90.zip |
fixed barbarian duke
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt | 13 |
1 files changed, 6 insertions, 7 deletions
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 "" |