aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-08-19 17:41:50 +0200
committerLorenz <lo.scherf@gmail.com>2022-08-19 17:41:50 +0200
commitbd8cc161ab959bf0cacf3784371f0d53efd39d2a (patch)
tree0563326c55aa0db821a2e48659b0373bcd187409 /src
parentfe03e4d479e37169c31afd0c1e2746f628c08cc2 (diff)
downloadskyhanni-bd8cc161ab959bf0cacf3784371f0d53efd39d2a.tar.gz
skyhanni-bd8cc161ab959bf0cacf3784371f0d53efd39d2a.tar.bz2
skyhanni-bd8cc161ab959bf0cacf3784371f0d53efd39d2a.zip
fixed OPEN_SOURCE_SOFTWARE.md
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt11
1 files changed, 5 insertions, 6 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 799d95b69..317260901 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/DamageIndicatorManager.kt
@@ -544,14 +544,13 @@ class DamageIndicatorManager {
}
@SubscribeEvent(priority = EventPriority.HIGH)
- fun onRenderLiving(e: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
- val entity = e.entity
+ fun onRenderLiving(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
+ val entity = event.entity
if (entity.ticksExisted > 300 || entity !is EntityArmorStand) return
if (!entity.hasCustomName()) return
if (entity.isDead) return
- val strippedName = entity.customNameTag.removeColor().replace(",", "")
- val damageMatcher = damagePattern.matcher(strippedName)
- if (!damageMatcher.matches()) return
+ val name = entity.customNameTag.removeColor().replace(",", "")
+ if (!damagePattern.matcher(name).matches()) return
if (SkyHanniMod.feature.misc.fixSkytilsDamageSplash) {
entity.customNameTag = entity.customNameTag.replace(",", "")
@@ -562,7 +561,7 @@ class DamageIndicatorManager {
val distance = it.entity.getLorenzVec().distance(entity.getLorenzVec())
distance < 4.5
}) {
- e.isCanceled = true
+ event.isCanceled = true
}
}
}