diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-08 16:52:09 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-08 16:52:09 +0100 |
commit | f87b7f68cbbcfd7a940fc4e3888ac94545132543 (patch) | |
tree | 60b40ecbd451cdd87dbf3200fdf3f747ee7c42c5 | |
parent | 2e436dd40e158b64d6c7b4e3bbd32fcf01f97e0a (diff) | |
download | skyhanni-f87b7f68cbbcfd7a940fc4e3888ac94545132543.tar.gz skyhanni-f87b7f68cbbcfd7a940fc4e3888ac94545132543.tar.bz2 skyhanni-f87b7f68cbbcfd7a940fc4e3888ac94545132543.zip |
isInIsland > skyBlockIsland
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 7 | ||||
-rw-r--r-- | 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 "?" |