diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 18:48:54 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 18:48:54 +0200 |
commit | f365edf25f6c913dbeb8295add0a02ed2e09908d (patch) | |
tree | 605e50c82af1cc05cbe769015aea9a714c888693 /src | |
parent | d82e073b6b2705213cc18dd19ee20806881bb4cf (diff) | |
download | skyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.tar.gz skyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.tar.bz2 skyhanni-f365edf25f6c913dbeb8295add0a02ed2e09908d.zip |
showing number next to hellion shield from damage indicator
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt | 18 |
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 "" |