aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-15 15:58:05 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-15 15:58:05 +0200
commite88d096f7530110685e06f595e4f63239f8ca437 (patch)
tree8cc1a65890a7d38fd484c87a0dfa08f3df07cf91 /src/main/java/at/hannibal2/skyhanni
parent2b10ec4187769a5d7b29db52439fdb52971605de (diff)
downloadskyhanni-e88d096f7530110685e06f595e4f63239f8ca437.tar.gz
skyhanni-e88d096f7530110685e06f595e4f63239f8ca437.tar.bz2
skyhanni-e88d096f7530110685e06f595e4f63239f8ca437.zip
show dead when dead
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossFinder.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/EntityData.kt3
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