aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt3
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 "?"