From 552c1fadef20f0fb67b9364ab89bf4e1eeaad0b6 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 24 Dec 2023 12:54:38 +0100 Subject: code cleanup --- .../skyhanni/features/combat/mobs/MobHighlight.kt | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt index 410f6ea98..b55fc7c03 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt @@ -51,21 +51,23 @@ class MobHighlight { RenderLivingEntityHelper.setNoHurtTime(entity) { config.corleoneHighlighter } } - if (config.zealotBruiserHighlighter) { - val isZealot = maxHealth == 13_000 || maxHealth == 13_000 * 4 // runic - val isBruiser = maxHealth == 65_000 || maxHealth == 65_000 * 4 // runic - if ((isZealot || isBruiser) && entity is EntityEnderman) { - RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.DARK_AQUA.toColor().withAlpha(127)) - { config.zealotBruiserHighlighter } - RenderLivingEntityHelper.setNoHurtTime(entity) { config.zealotBruiserHighlighter } + if (entity is EntityEnderman) { + if (config.zealotBruiserHighlighter) { + val isZealot = maxHealth == 13_000 || maxHealth == 13_000 * 4 // runic + val isBruiser = maxHealth == 65_000 || maxHealth == 65_000 * 4 // runic + if (isZealot || isBruiser) { + RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.DARK_AQUA.toColor().withAlpha(127)) + { config.zealotBruiserHighlighter } + RenderLivingEntityHelper.setNoHurtTime(entity) { config.zealotBruiserHighlighter } + } } - } - // Special Zealots are not impacted by derpy - if (config.specialZealotHighlighter && maxHealth.ignoreDerpy() == 2_000 && entity is EntityEnderman) { - RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.DARK_RED.toColor().withAlpha(50)) - { config.specialZealotHighlighter } - RenderLivingEntityHelper.setNoHurtTime(entity) { config.specialZealotHighlighter } + // Special Zealots are not impacted by derpy + if (config.specialZealotHighlighter && maxHealth.ignoreDerpy() == 2_000) { + RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.DARK_RED.toColor().withAlpha(50)) + { config.specialZealotHighlighter } + RenderLivingEntityHelper.setNoHurtTime(entity) { config.specialZealotHighlighter } + } } if (config.arachneBossHighlighter && entity is EntitySpider) { -- cgit