diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 15:02:31 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 15:02:31 +0100 |
commit | 78a62698020876e4ff08a4ee3afce8ffd24c2bf8 (patch) | |
tree | f61945f5f2de662789dccb89c02d07db6bf6a96a /src/main | |
parent | 9e8b8eec454e23e139ed9150d7f19ca0e451c3b0 (diff) | |
download | skyhanni-78a62698020876e4ff08a4ee3afce8ffd24c2bf8.tar.gz skyhanni-78a62698020876e4ff08a4ee3afce8ffd24c2bf8.tar.bz2 skyhanni-78a62698020876e4ff08a4ee3afce8ffd24c2bf8.zip |
Show laser phase timer during hit phase after a successful damage phase skip.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index 2b6418a02..dc00b93ef 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -106,7 +106,7 @@ class DamageIndicatorManager { fun removeDamageIndicator(type: BossType) { data = data.editCopy { - values.removeIf {it.bossType == type} + values.removeIf { it.bossType == type } } } } @@ -642,6 +642,7 @@ class DamageIndicatorManager { } //Hit phase + var hitPhaseText: String? = null val armorStandHits = entity.getNameTagWith(3, " Hit") if (armorStandHits != null) { val maxHits = when (entityData.bossType) { @@ -655,7 +656,7 @@ class DamageIndicatorManager { group("hits").toInt() } ?: error("No hits number found in ender slayer name '${armorStandHits.name}'") - return NumberUtil.percentageColor(hits.toLong(), maxHits.toLong()).getChatColor() + "$hits Hits" + hitPhaseText = NumberUtil.percentageColor(hits.toLong(), maxHits.toLong()).getChatColor() + "$hits Hits" } //Laser phase @@ -665,12 +666,15 @@ class DamageIndicatorManager { val ticksAlive = entity.ridingEntity.ticksExisted.ticks val remainingTime = totalTimeAlive - ticksAlive val formatDelay = formatDelay(remainingTime) - if (config.enderSlayer.showHealthDuringLaser) { + if (config.enderSlayer.showHealthDuringLaser || hitPhaseText != null) { entityData.nameSuffix = " §f$formatDelay" } else { return formatDelay } } + hitPhaseText?.let { + return it + } return result } |