diff options
3 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt index 0ad303929..6f7c6350d 100644 --- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt +++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt @@ -51,7 +51,8 @@ class BossDamageIndicator { val player = Minecraft.getMinecraft().thePlayer - for (uuid in data.filter { System.currentTimeMillis() > it.value.timeLastTick + 100 }.map { it.key }) { + //TODO config to define between 100ms and 5 sec + for (uuid in data.filter { System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead) 3_000 else 100 }.map { it.key }) { data.remove(uuid) } @@ -308,7 +309,11 @@ class BossDamageIndicator { } } } - val color = percentageColor(calcHealth, calcMaxHealth) +// } + if (health == 0) { + customHealthText = "§cDead" + entityData.dead = true + } if (SkyHanniMod.feature.misc.damageIndicatorHealingMessage) { if (data.containsKey(entity.uniqueID)) { diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossFinder.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossFinder.kt index 7239b501a..fdd892e41 100644 --- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossFinder.kt @@ -518,4 +518,4 @@ fun EntityLiving.hasNameTagWith( if (result) consumer(it) result } -} +}
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/EntityData.kt index 0f85b8733..572ee69fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/damageindicator/EntityData.kt +++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/EntityData.kt @@ -14,5 +14,6 @@ class EntityData( var timeLastTick: Long = 0, var healthLineHidden: Boolean = false, var namePrefix: String = "", - var nameSuffix: String = "" + var nameSuffix: String = "", + var dead: Boolean = false )
\ No newline at end of file |