Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Special Zealot Highlight #3099

Merged
merged 4 commits into from
Dec 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import at.hannibal2.skyhanni.utils.LorenzUtils.ignoreDerpy
import at.hannibal2.skyhanni.utils.RenderUtils.drawLineToEye
import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.client.entity.EntityOtherPlayerMP
Expand Down Expand Up @@ -70,27 +69,24 @@ object MobHighlight {
val isZealot = maxHealth == 13_000 || maxHealth == 13_000 * 4 // runic
val isBruiser = maxHealth == 65_000 || maxHealth == 65_000 * 4 // runic

if (!(isZealot || isBruiser)) return

if (config.zealotBruiserHighlighter) {
if (isZealot || isBruiser) {
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(
entity,
LorenzColor.DARK_AQUA.toColor().addAlpha(127),
) { config.zealotBruiserHighlighter }
}
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(
entity,
LorenzColor.DARK_AQUA.toColor().addAlpha(127),
) { config.zealotBruiserHighlighter }
}

if (config.chestZealotHighlighter) {
val isHoldingChest = entity.getBlockInHand()?.block == Blocks.ender_chest
if ((isZealot || isBruiser) && isHoldingChest) {
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(
entity,
LorenzColor.GREEN.toColor().addAlpha(127),
) { config.chestZealotHighlighter }
}
val heldItem = entity.getBlockInHand()?.block
if (config.chestZealotHighlighter && heldItem == Blocks.ender_chest) {
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(
entity,
LorenzColor.GREEN.toColor().addAlpha(127),
) { config.chestZealotHighlighter }
}

// Special Zealots are not impacted by derpy
if (config.specialZealotHighlighter && maxHealth.ignoreDerpy() == 2_000) {
if (config.specialZealotHighlighter && heldItem == Blocks.end_portal_frame) {
RenderLivingEntityHelper.setEntityColorWithNoHurtTime(
entity,
LorenzColor.DARK_RED.toColor().addAlpha(50),
Expand Down
Loading