summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-03-06 19:44:41 +1100
committerGitHub <noreply@github.com>2024-03-06 09:44:41 +0100
commit30b3b6951ca9a29dd0ba27e0f34efad3b05a4aa4 (patch)
treeaed7083057192eed264f3edc614e5aaae7e2cf28 /src/main/java/at/hannibal2/skyhanni/features/misc
parent82a00ed51d55d2be7d65d24c2e93e797cab33864 (diff)
downloadskyhanni-30b3b6951ca9a29dd0ba27e0f34efad3b05a4aa4.tar.gz
skyhanni-30b3b6951ca9a29dd0ba27e0f34efad3b05a4aa4.tar.bz2
skyhanni-30b3b6951ca9a29dd0ba27e0f34efad3b05a4aa4.zip
Backend: Use more isInIsland (#1107)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-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
3 files changed, 7 insertions, 8 deletions
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