From f87b7f68cbbcfd7a940fc4e3888ac94545132543 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:52:09 +0100 Subject: isInIsland > skyBlockIsland --- .../java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 7 +++---- src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index dd90c744e..53f385662 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -26,6 +26,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.canBeSeen import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.LorenzUtils.formatInteger +import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary @@ -332,11 +333,9 @@ class MinionFeatures { } } - private fun enable() = - LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.PRIVATE_ISLAND + private fun enable() = IslandType.PRIVATE_ISLAND.isInIsland() - private fun enableWithHub() = - enable() || (LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.HUB) + private fun enableWithHub() = enable() || IslandType.HUB.isInIsland() @SubscribeEvent(priority = EventPriority.LOWEST) fun renderOverlay(event: GuiScreenEvent.BackgroundDrawnEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt index b468bc33d..d9ec96dac 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt @@ -53,6 +53,9 @@ object LorenzUtils { val inDungeons get() = inSkyBlock && DungeonAPI.inDungeon() + /** + * Consider using IslandType.isInIsland() instead + */ val skyBlockIsland get() = HypixelData.skyBlockIsland val skyBlockArea get() = if (inSkyBlock) HypixelData.skyBlockArea else "?" -- cgit