aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/damageindicator
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/damageindicator')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt23
-rw-r--r--src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt6
2 files changed, 21 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
index 85996919b..f63b7c6cf 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt
@@ -88,7 +88,13 @@ class BossDamageIndicator {
6f
)
- var bossName = data.bossType.bossName
+ var bossName = when (SkyHanniMod.feature.misc.damageIndicatorBossName) {
+ 0 -> ""
+ 1 -> data.bossType.fullName
+ 2 -> data.bossType.shortName
+ else -> data.bossType.fullName
+ }
+
if (data.namePrefix.isNotEmpty()) {
bossName = data.namePrefix + bossName
}
@@ -328,14 +334,21 @@ class BossDamageIndicator {
val healed = health - lastHealth
if (healed <= 0) return
- //Hide auto heal every 10 ticks
- if (healed == 15_000 && bossType == BossType.HUB_REVENANT_HORROR) return
+ //Hide auto heal every 10 ticks (with rounding errors)
+ if ((healed == 15_000 || healed == 15_001) && bossType == BossType.HUB_REVENANT_HORROR) return
val formatLastHealth = NumberUtil.format(lastHealth)
val formatHealth = NumberUtil.format(health)
val healedFormat = NumberUtil.format(healed)
- println(bossType.bossName + " §fhealed for $healed❤ ($lastHealth -> $health)")
- LorenzUtils.chat(bossType.bossName + " §ehealed for §a$healedFormat❤ §8(§e$formatLastHealth -> $formatHealth§8)")
+
+
+ val bossName = when (SkyHanniMod.feature.misc.damageIndicatorBossName) {
+ 2 -> bossType.shortName
+ else -> bossType.fullName
+ }
+
+ println(bossName + " §healed for $healed❤ ($lastHealth -> $health)")
+ LorenzUtils.chat("$bossName §ehealed for §a$healedFormat❤ §8(§e$formatLastHealth -> $formatHealth§8)")
}
private fun grabData(entity: EntityLivingBase): EntityData? {
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
index a913bbf4b..763bb3056 100644
--- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossType.kt
@@ -1,7 +1,7 @@
package at.hannibal2.skyhanni.damageindicator
-enum class BossType(val bossName: String) {
- DUNGEON("Generic Dungeon boss"),//TODO split in different bosses
+enum class BossType(val fullName: String, val shortName: String = fullName) {
+ DUNGEON("Generic Dungeon boss"),//TODO split into different bosses
NETHER_BLADESOUL("§8Bladesoul"),
NETHER_MAGMA_BOSS("§4Magma Boss"),
@@ -15,6 +15,6 @@ enum class BossType(val bossName: String) {
END_ENDERMAN_SLAYER("Voidgloom Seraph"),//TODO use seperate enums per tier
END_ENDER_DRAGON("Ender Dragon"),//TODO fix totally
- HUB_REVENANT_HORROR("§5Revenant Horror 5"),//TODO add other variants like voidgloom?
+ HUB_REVENANT_HORROR("§5Revenant Horror 5", "§5Rev 5"),//TODO add other variants like voidgloom?
HUB_HEADLESS_HORSEMAN("§6Headless Horseman"),
} \ No newline at end of file