From f2711d19b3a727eb0f204d064f49cb7355540282 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 16 Dec 2023 06:50:45 -0400 Subject: Add highlight for minos inquisitors to make them easier to see (#802) Add highlight for Minos Inquisitors to make them easier to see. #802 --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 ++ .../config/features/event/diana/DianaConfig.java | 6 +++++ .../features/event/diana/HighlightInquisitors.kt | 26 ++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index fad364296..0a8e08ce5 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -112,6 +112,7 @@ import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowParticleFinder import at.hannibal2.skyhanni.features.event.diana.GriffinPetWarning import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare import at.hannibal2.skyhanni.features.event.diana.SoopyGuessBurrow +import at.hannibal2.skyhanni.features.event.jerry.HighlightInquisitors import at.hannibal2.skyhanni.features.event.jerry.HighlightJerries import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker import at.hannibal2.skyhanni.features.event.lobby.waypoints.christmas.PresentWaypoints @@ -678,6 +679,7 @@ class SkyHanniMod { loadModule(PresentWaypoints()) loadModule(JyrreTimer()) loadModule(NewYearCakeReminder()) + loadModule(HighlightInquisitors()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java index f2db07f7e..a99268b0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/diana/DianaConfig.java @@ -10,6 +10,12 @@ import org.lwjgl.input.Keyboard; public class DianaConfig { + @Expose + @ConfigOption(name = "Highlight Inquisitors", desc = "Highlights Inquisitors found from the Mythological Event perk.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightInquisitors = true; + @Expose @ConfigOption(name = "Guess Next Burrow", desc = "Uses math from §eSoopy's Guess Logic §7to find the next burrow. Does not require SoopyV2 or ChatTriggers to be installed.") @ConfigEditorBoolean diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt new file mode 100644 index 000000000..59d10dbb5 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/HighlightInquisitors.kt @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.features.event.jerry + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.withAlpha +import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper +import at.hannibal2.skyhanni.utils.LorenzColor +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.entity.player.EntityPlayer +import net.minecraftforge.event.entity.EntityJoinWorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class HighlightInquisitors { + private val config get() = SkyHanniMod.feature.event.diana + + @SubscribeEvent + fun onJoinWorld(event: EntityJoinWorldEvent) { + if (!LorenzUtils.inSkyBlock) return + if (!config.highlightInquisitors) return + + val entity = event.entity + + if (entity is EntityPlayer && entity.name == "Minos Inquisitor") { + RenderLivingEntityHelper.setEntityColor(entity, LorenzColor.AQUA.toColor().withAlpha(127)) { config.highlightInquisitors } + } + } +} -- cgit