summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 03:11:17 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 03:11:17 +0100
commit0c711242c8d96517e49e0ecc7a081f8e15cdd7ed (patch)
treeb890f54d39478f0dab45e9fa986eae01d4de7ca3 /src/main/java/at/hannibal2/skyhanni/features
parentce0956ac232f444724f90f0633b4b35f3dd8cfdf (diff)
downloadskyhanni-0c711242c8d96517e49e0ecc7a081f8e15cdd7ed.tar.gz
skyhanni-0c711242c8d96517e49e0ecc7a081f8e15cdd7ed.tar.bz2
skyhanni-0c711242c8d96517e49e0ecc7a081f8e15cdd7ed.zip
Introduced IslandType enum.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/end/VoidlingExtremistColor.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/CorruptedMobHighlight.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/MilleniaAgedBlazeColor.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt3
5 files changed, 15 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/end/VoidlingExtremistColor.kt b/src/main/java/at/hannibal2/skyhanni/features/end/VoidlingExtremistColor.kt
index 6f6a083d8..c9b02bf5d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/end/VoidlingExtremistColor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/end/VoidlingExtremistColor.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.end
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.RenderMobColoredEvent
import at.hannibal2.skyhanni.events.ResetEntityHurtEvent
import at.hannibal2.skyhanni.events.withAlpha
@@ -54,5 +55,5 @@ class VoidlingExtremistColor {
}
private fun isEnabled(): Boolean =
- LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == "The End" && SkyHanniMod.feature.misc.voidlingExtremistColor
+ LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.THE_END && SkyHanniMod.feature.misc.voidlingExtremistColor
} \ No newline at end of file
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 707c36405..ee72ff542 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.minion
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.ConfigLoadEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
@@ -48,7 +49,7 @@ class MinionFeatures {
@SubscribeEvent
fun onClick(event: InputEvent.MouseInputEvent) {
if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
if (!Mouse.getEventButtonState()) return
if (Mouse.getEventButton() != 1) return
@@ -63,7 +64,7 @@ class MinionFeatures {
@SubscribeEvent
fun onRenderLastClickedMinion(event: RenderWorldLastEvent) {
if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
if (!SkyHanniMod.feature.minions.lastClickedMinionDisplay) return
val special = SkyHanniMod.feature.minions.lastOpenedMinionColor
@@ -87,7 +88,7 @@ class MinionFeatures {
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
if (InventoryUtils.currentlyOpenInventory().contains("Minion")) {
if (lastClickedEntity != null) {
@@ -175,7 +176,7 @@ class MinionFeatures {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
if (event.message.matchRegex("§aYou received §r§6(.*) coins§r§a!")) {
lastCoinsRecived = System.currentTimeMillis()
@@ -189,7 +190,7 @@ class MinionFeatures {
fun onRenderLastEmptied(event: RenderWorldLastEvent) {
if (!LorenzUtils.inSkyBlock) return
if (!SkyHanniMod.feature.minions.emptiedTimeDisplay) return
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
val playerLocation = LocationUtils.playerLocation()
val playerEyeLocation = LocationUtils.playerEyeLocation()
@@ -211,7 +212,7 @@ class MinionFeatures {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLiving(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != "Private Island") return
+ if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
if (!SkyHanniMod.feature.minions.hideMobsNametagNearby) return
val entity = event.entity
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CorruptedMobHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CorruptedMobHighlight.kt
index d2ab1725a..0b4effca4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/CorruptedMobHighlight.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CorruptedMobHighlight.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.RenderMobColoredEvent
import at.hannibal2.skyhanni.events.ResetEntityHurtEvent
@@ -56,6 +57,6 @@ class CorruptedMobHighlight {
private fun isEnabled(): Boolean {
return LorenzUtils.inSkyBlock && SkyHanniMod.feature.misc.corruptedMobHighlight &&
- LorenzUtils.skyBlockIsland != "Private Island"
+ LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/MilleniaAgedBlazeColor.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/MilleniaAgedBlazeColor.kt
index 2d25076a9..8a9cad4fa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/MilleniaAgedBlazeColor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/MilleniaAgedBlazeColor.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.nether
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.RenderMobColoredEvent
import at.hannibal2.skyhanni.events.ResetEntityHurtEvent
import at.hannibal2.skyhanni.events.withAlpha
@@ -54,5 +55,5 @@ class MilleniaAgedBlazeColor {
}
private fun isEnabled() =
- LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == "Crimson Isle" && SkyHanniMod.feature.misc.milleniaAgedBlazeColor
+ LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.CRIMSON_ISLE && SkyHanniMod.feature.misc.milleniaAgedBlazeColor
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt
index df3c5117f..a36db4820 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.slayer
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.CheckRenderEntityEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.RenderMobColoredEvent
@@ -100,7 +101,7 @@ class EndermanSlayerBeacon {
private fun isEnabled(): Boolean = LorenzUtils.inSkyBlock &&
SkyHanniMod.feature.slayer.slayerEndermanBeacon &&
- LorenzUtils.skyBlockIsland == "The End" &&
+ LorenzUtils.skyBlockIsland == IslandType.THE_END &&
DamageIndicatorManager.isBossSpawned(
BossType.SLAYER_ENDERMAN_2,
BossType.SLAYER_ENDERMAN_3,