From a4db6ba2104c7e59364c75e06edd5fd291b72406 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Sun, 4 Sep 2022 22:38:28 +0200 Subject: added option to hide damage splashes around ashfang --- .../features/dungeon/DungeonBossHideDamageSplash.kt | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/dungeon') 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 -- cgit