aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 18:48:54 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 18:48:54 +0200
commitf365edf25f6c913dbeb8295add0a02ed2e09908d (patch)
tree605e50c82af1cc05cbe769015aea9a714c888693 /src/main/java/at/hannibal2/skyhanni
parentd82e073b6b2705213cc18dd19ee20806881bb4cf (diff)
downloadskyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.tar.gz
skyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.tar.bz2
skyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.zip
showing number next to hellion shield from damage indicator
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt18
1 files changed, 14 insertions, 4 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 7b8809df1..90be9e0d1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
@@ -384,10 +384,20 @@ class DamageIndicatorManager {
}
private fun checkBlazeSlayer(entity: EntityLiving, entityData: EntityData, health: Int, maxHealth: Int): String? {
- val shield = HellionShield.values().firstOrNull { entity.hasNameTagWith(3, it.name) }
- entity.setHellionShield(shield)
- if (shield != null) {
- entityData.nameAbove = shield.formattedName
+ val shields = HellionShield.values()
+ var found = false
+ for (shield in shields) {
+ val armorStand = entity.getNameTagWith(3, shield.name)
+ if (armorStand != null) {
+ val number = armorStand.name.split(" ♨")[1].substring(0, 1)
+ entity.setHellionShield(shield)
+ entityData.nameAbove = shield.formattedName + " $number"
+ found = true
+ break
+ }
+ }
+ if (!found) {
+ entity.setHellionShield(null)
}
if (!SkyHanniMod.feature.slayer.blazePhaseDisplay) return ""