From ab0cb07f2fdc4b3f723c4560bbbada258d5dd246 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:47:25 +0100 Subject: Fixed Damage Indicator "hide nametag" feature works even for disabled mobs. --- .../java/at/hannibal2/skyhanni/config/features/CombatConfig.java | 2 +- .../features/combat/damageindicator/DamageIndicatorManager.kt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java index 458e3daf7..d0d69afba 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/CombatConfig.java @@ -63,7 +63,7 @@ public class CombatConfig { "§bTarantula Broodfather", "§bSven Packmaster", "§bVoidgloom Seraph", - "§bInferno Demonlord (only tier 1 yet)", + "§bInferno Demonlord", "§bHeadless Horseman (bugged)", "§bDungeon Floor 1", "§bDungeon Floor 2", diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index 4d7ed5593..4f202fc62 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -158,7 +158,7 @@ class DamageIndicatorManager { // data.bossType == BossType.END_ENDSTONE_PROTECTOR && Minecraft.getMinecraft().thePlayer.isSneaking if (!data.ignoreBlocks && !player.canEntityBeSeen(data.entity)) continue - if (data.bossType.bossTypeToggle !in config.bossesToShow) continue + if (!data.isConfigEnabled()) continue val entity = data.entity @@ -254,6 +254,8 @@ class DamageIndicatorManager { GlStateManager.enableCull() } + private fun EntityData.isConfigEnabled() = bossType.bossTypeToggle in config.bossesToShow + private fun noDeathDisplay(bossType: BossType): Boolean { return when (bossType) { BossType.SLAYER_BLAZE_TYPHOEUS_1, @@ -835,7 +837,7 @@ class DamageIndicatorManager { } } } else { - if (entityData != null && isEnabled() && config.hideVanillaNametag) { + if (entityData != null && isEnabled() && config.hideVanillaNametag && entityData.isConfigEnabled()) { val name = entity.name if (name.contains("Plaesmaflux")) return if (name.contains("Overflux")) return -- cgit