aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadInventoryNumber.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt1
11 files changed, 20 insertions, 25 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt
index 57a9a5f9e..0986caa70 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -30,7 +31,6 @@ class ArachneChatMessageHider {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!isEnabled()) return
- if (LorenzUtils.skyBlockIsland != IslandType.SPIDER_DEN) return
if (LorenzUtils.skyBlockArea == "Arachne's Sanctuary") return
if (shouldHide(event.message)) {
@@ -61,5 +61,5 @@ class ArachneChatMessageHider {
return hideArachneDeadMessage
}
- fun isEnabled() = LorenzUtils.inSkyBlock && config.hideArachneMessages
+ fun isEnabled() = IslandType.SPIDER_DEN.isInIsland() && config.hideArachneMessages
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
index 8f53aa5d9..c4eb1f074 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt
@@ -403,7 +403,6 @@ object GhostCounter {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!isEnabled()) return
- if (LorenzUtils.skyBlockIsland != IslandType.DWARVEN_MINES) return
for (opt in Option.entries) {
val pattern = opt.pattern ?: continue
pattern.matchMatcher(event.message) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index 819718daf..b4f6050dd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.features.event.diana
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
@@ -226,7 +225,7 @@ object InquisitorWaypointShare {
@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
fun onFirstChatEvent(event: PacketEvent.ReceiveEvent) {
- if (!isEnabled() || LorenzUtils.skyBlockIsland != IslandType.HUB) return
+ if (!isEnabled()) return
val packet = event.packet
if (packet !is S02PacketChat) return
val messageComponent = packet.chatComponent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
index 4ee986dbf..c1bbb347a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt
@@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -24,7 +24,7 @@ class JoinCrystalHollows {
val message = event.message
if (message == "§cYou do not have an active Crystal Hollows pass!") {
lastWrongPassTime = System.currentTimeMillis()
- if (LorenzUtils.skyBlockIsland != IslandType.DWARVEN_MINES) {
+ if (!IslandType.DWARVEN_MINES.isInIsland()) {
ChatUtils.clickableChat("Click here to warp to Dwarven Mines!", "warp mines")
} else {
ChatUtils.chat("Buy a §2Crystal Hollows Pass §efrom §5Gwendolyn")
@@ -49,9 +49,8 @@ class JoinCrystalHollows {
@SubscribeEvent
fun onRenderWorld(event: LorenzRenderWorldEvent) {
- if (!LorenzUtils.inSkyBlock) return
+ if (!IslandType.DWARVEN_MINES.isInIsland()) return
if (!isEnabled()) return
- if (LorenzUtils.skyBlockIsland != IslandType.DWARVEN_MINES) return
if (inTime()) {
val location = LorenzVec(88, 198, -99)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
index 7c0745a40..3b08970cf 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
@@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc.teleportpad
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
-import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.entity.EntityLivingBase
@@ -24,8 +24,8 @@ class TeleportPadCompactName {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLivingB(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
+ if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
if (!SkyHanniMod.feature.misc.teleportPad.compactName) return
- if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
val entity = event.entity
if (entity !is EntityArmorStand) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadInventoryNumber.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadInventoryNumber.kt
index dd2ddd91d..92b47fc53 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadInventoryNumber.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadInventoryNumber.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent
import at.hannibal2.skyhanni.utils.ItemUtils.name
-import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -75,7 +75,7 @@ class TeleportPadInventoryNumber {
@SubscribeEvent
fun onRenderItemTip(event: RenderInventoryItemTipEvent) {
- if (LorenzUtils.skyBlockIsland != IslandType.PRIVATE_ISLAND) return
+ if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
if (!inTeleportPad) return
val name = event.stack.name?.lowercase() ?: return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
index 28a23a962..bb12afda2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt
@@ -29,7 +29,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) {
- val config get() = SkyHanniMod.feature.crimsonIsle.reputationHelper
+ private val config get() = SkyHanniMod.feature.crimsonIsle.reputationHelper
val questHelper = DailyQuestHelper(this)
val miniBossHelper = DailyMiniBossHelper(this)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
index f8979a57a..977085457 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailykuudra/DailyKuudraBossHelper.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
@@ -29,9 +30,8 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH
@SubscribeEvent
fun onRenderWorld(event: LorenzRenderWorldEvent) {
- if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
- if (!reputationHelper.config.enabled) return
+ if (!IslandType.CRIMSON_ISLE.isInIsland()) return
+ if (!config.enabled) return
if (!reputationHelper.showLocations()) return
if (allKuudraDone) return
@@ -44,7 +44,7 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!LorenzUtils.inKuudraFight) return
- if (!reputationHelper.config.enabled) return
+ if (!config.enabled) return
val message = event.message
if (!message.contains("KUUDRA DOWN!") || message.contains(":")) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
index 4de3c1bb9..89ff65e5c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
@@ -314,5 +314,5 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
}
}
- private fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && reputationHelper.config.enabled
+ private fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && config.enabled
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
index 5feda5c8d..257e5d9b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt
@@ -14,7 +14,6 @@ import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NEUItems.getItemStack
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
@@ -28,8 +27,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
- if (!IslandType.CRIMSON_ISLE.isInIsland()) return
- if (!reputationHelper.config.enabled) return
+ if (!isEnabled()) return
val message = event.message
for (miniBoss in miniBosses) {
@@ -41,9 +39,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
@SubscribeEvent
fun onRenderWorld(event: LorenzRenderWorldEvent) {
- if (!LorenzUtils.inSkyBlock) return
- if (LorenzUtils.skyBlockIsland != IslandType.CRIMSON_ISLE) return
- if (!reputationHelper.config.enabled) return
+ if (!isEnabled()) return
if (!reputationHelper.showLocations()) return
val playerLocation = LocationUtils.playerLocation()
@@ -119,4 +115,5 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel
}
private fun getByDisplayName(name: String) = miniBosses.firstOrNull { it.displayName == name }
+ private fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && config.enabled
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
index 3ffe8f8e6..536f96dd4 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/DebugCommand.kt
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.DebugDataCollectEvent
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.equalsIgnoreColor