aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/dungeon
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-04 22:38:28 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-04 22:38:28 +0200
commita4db6ba2104c7e59364c75e06edd5fd291b72406 (patch)
treedc2b66f596e074f3dac357ec27d9d05eb261aadf /src/main/java/at/hannibal2/skyhanni/features/dungeon
parent22f7ac624784bc70721022699bc430bcca2f6357 (diff)
downloadskyhanni-a4db6ba2104c7e59364c75e06edd5fd291b72406.tar.gz
skyhanni-a4db6ba2104c7e59364c75e06edd5fd291b72406.tar.bz2
skyhanni-a4db6ba2104c7e59364c75e06edd5fd291b72406.zip
added option to hide damage splashes around ashfang
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/dungeon')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
index 397038401..62d28d3cb 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
@@ -2,9 +2,7 @@ package at.hannibal2.skyhanni.features.dungeon
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
-import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraft.entity.EntityLivingBase
-import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.client.event.RenderLivingEvent
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -16,13 +14,8 @@ class DungeonBossHideDamageSplash {
if (!SkyHanniMod.feature.dungeon.damageSplashBoss) return
if (!DungeonData.inBossRoom) return
- val entity = event.entity
- if (entity.ticksExisted > 300 || entity !is EntityArmorStand) return
- if (!entity.hasCustomName()) return
- if (entity.isDead) return
- val name = entity.customNameTag.removeColor().replace(",", "")
- if (!DamageIndicatorManager.damagePattern.matcher(name).matches()) return
-
- event.isCanceled = true
+ if (DamageIndicatorManager.isDamageSplash(event.entity)) {
+ event.isCanceled = true
+ }
}
} \ No newline at end of file