aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-04-09 20:49:52 +0200
committerGitHub <noreply@github.com>2024-04-09 20:49:52 +0200
commit58f1fec99d532c517aaf309772874ad5629ea39b (patch)
treee4c52e21f7bbbc6920253584680dae33770693d1 /src/main/java/at/hannibal2/skyhanni
parent259acef3cffac049f20c528cb21740e0ec394f3e (diff)
downloadskyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.tar.gz
skyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.tar.bz2
skyhanni-58f1fec99d532c517aaf309772874ad5629ea39b.zip
Backend: Switch from LorenzUtils.inDungeons to DungeonAPI.inDungeon() (#1378)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/JsonUtils.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt5
36 files changed, 65 insertions, 73 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
index 85b0e8ec7..ebfb4a892 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.MaxwellPowersJson
import at.hannibal2.skyhanni.events.InventoryOpenEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardElement
import at.hannibal2.skyhanni.test.command.ErrorManager
@@ -12,7 +13,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.groupOrNull
-import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NumberUtil.formatInt
import at.hannibal2.skyhanni.utils.StringUtils.matchFirst
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -250,7 +250,7 @@ object MaxwellAPI {
inventoryMPPattern.matchMatcher(line) {
// MagicalPower is boosted in catacombs
- if (IslandType.CATACOMBS.isInIsland()) return@matchMatcher
+ if (DungeonAPI.inDungeon()) return@matchMatcher
val mp = group("mp")
magicalPower = mp.formatInt()
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java
index 3388cb62c..4173fa0a3 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java
+++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/ArrowTypeJson.java
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.data.jsonobjects.repo;
import com.google.gson.annotations.Expose;
+
import java.util.Map;
public class ArrowTypeJson {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
index 05b4a0cd7..f44185c4c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/PlayerDeathMessages.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.chat
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.EntityUtils
@@ -42,7 +43,7 @@ class PlayerDeathMessages {
deathMessagePattern.matchMatcher(message) {
val name = group("name")
if (MarkedPlayerManager.config.highlightInChat &&
- !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight && MarkedPlayerManager.isMarkedPlayer(name)
+ !DungeonAPI.inDungeon() && !LorenzUtils.inKuudraFight && MarkedPlayerManager.isMarkedPlayer(name)
) {
val reason = group("reason").removeColor()
@@ -68,6 +69,6 @@ class PlayerDeathMessages {
}
private fun isHideFarDeathsEnabled(): Boolean {
- return LorenzUtils.inSkyBlock && SkyHanniMod.feature.chat.hideFarDeathMessages && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
+ return LorenzUtils.inSkyBlock && SkyHanniMod.feature.chat.hideFarDeathMessages && !DungeonAPI.inDungeon() && !LorenzUtils.inKuudraFight
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
index 563917cd3..57096d6de 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
@@ -333,7 +333,7 @@ class DamageIndicatorManager {
private fun checkEntity(entity: EntityLivingBase): Pair<UUID, EntityData>? {
try {
val entityData = grabData(entity) ?: return null
- if (LorenzUtils.inDungeons) {
+ if (DungeonAPI.inDungeon()) {
checkFinalBoss(entityData.finalDungeonBoss, entity.entityId)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
index 6c284d596..5d0be14de 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt
@@ -11,7 +11,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasBossHealth
import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth
import at.hannibal2.skyhanni.utils.EntityUtils.hasNameTagWith
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import at.hannibal2.skyhanni.utils.LorenzUtils.derpy
import at.hannibal2.skyhanni.utils.LorenzUtils.ignoreDerpy
@@ -83,7 +82,7 @@ class MobFinder {
private var floor6SadanSpawnTime = 0L
internal fun tryAdd(entity: EntityLivingBase) = when {
- LorenzUtils.inDungeons -> tryAddDungeon(entity)
+ DungeonAPI.inDungeon() -> tryAddDungeon(entity)
RiftAPI.inRift() -> tryAddRift(entity)
GardenAPI.inGarden() -> tryAddGarden(entity)
else -> {
@@ -512,7 +511,7 @@ class MobFinder {
}
fun handleChat(message: String) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
when (message) {
// F1
"§c[BOSS] Bonzo§r§f: Gratz for making it this far, but I'm basically unbeatable." -> {
@@ -609,7 +608,7 @@ class MobFinder {
}
fun handleNewEntity(entity: Entity) {
- if (LorenzUtils.inDungeons && floor3ProfessorGuardian && entity is EntityGuardian && floor3ProfessorGuardianEntity == null) {
+ if (DungeonAPI.inDungeon() && floor3ProfessorGuardian && entity is EntityGuardian && floor3ProfessorGuardianEntity == null) {
floor3ProfessorGuardianEntity = entity
floor3ProfessorGuardianPrepare = false
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
index cf893fd0d..fca4e0668 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.dungeon
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.events.DebugDataCollectEvent
@@ -16,6 +17,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.equalsOneOf
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
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.NumberUtil.formatInt
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.StringUtils.matchFirst
@@ -57,7 +59,7 @@ object DungeonAPI {
"§.\\s+§.§.(?:The|Master Mode) Catacombs §.§.- §.§.(?:Floor )?(?<floor>M?[IV]{1,3}|Entrance)"
)
- fun inDungeon() = dungeonFloor != null
+ fun inDungeon() = IslandType.CATACOMBS.isInIsland()
fun isOneOf(vararg floors: String) = dungeonFloor?.equalsOneOf(*floors) == true
@@ -242,7 +244,7 @@ object DungeonAPI {
fun onDebugDataCollect(event: DebugDataCollectEvent) {
event.title("Dungeon")
- if (!LorenzUtils.inDungeons) {
+ if (!inDungeon()) {
event.addIrrelevant("not in dungeons")
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
index 0d22b81be..6f5a83a85 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossHideDamageSplash.kt
@@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.features.dungeon
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent
import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
-import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.entity.EntityLivingBase
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -12,7 +11,7 @@ class DungeonBossHideDamageSplash {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLiving(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!SkyHanniMod.feature.dungeon.damageSplashBoss) return
if (!DungeonAPI.inBossRoom) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt
index 48765a095..dc4a6182d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.dungeon
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.LorenzChatEvent
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -45,7 +44,7 @@ class DungeonBossMessages {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!isBoss(event.message)) return
DungeonAPI.handleBossMessage(event.message)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt
index acdc50f95..495ff56a9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt
@@ -208,7 +208,7 @@ class DungeonChatFilter {
message.isFiltered(MessageTypes.START) -> return "start"
}
- if (!LorenzUtils.inDungeons) return ""
+ if (!DungeonAPI.inDungeon()) return ""
return when {
message.isFiltered(MessageTypes.AMBIENCE) -> "ambience"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
index c65e34964..d4469be52 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt
@@ -10,7 +10,6 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.utils.ChatUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.client.Minecraft
@@ -33,7 +32,7 @@ class DungeonCleanEnd {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!config.enabled) return
val message = event.message
@@ -44,7 +43,7 @@ class DungeonCleanEnd {
}
private fun shouldBlock(): Boolean {
- if (!LorenzUtils.inDungeons) return false
+ if (!DungeonAPI.inDungeon()) return false
if (!config.enabled) return false
if (!bossDone) return false
@@ -61,7 +60,7 @@ class DungeonCleanEnd {
@SubscribeEvent
fun onBossDead(event: DamageIndicatorFinalBossEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (bossDone) return
if (lastBossId == -1) {
@@ -71,7 +70,7 @@ class DungeonCleanEnd {
@SubscribeEvent
fun onEntityHealthUpdate(event: EntityHealthUpdateEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!config.enabled) return
if (bossDone) return
if (lastBossId == -1) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
index 60574b1c6..4fb461d9b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
@@ -91,7 +91,7 @@ class DungeonCopilot {
@SubscribeEvent
fun onCheckRender(event: CheckRenderEntityEvent<*>) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
val entity = event.entity
if (entity !is EntityArmorStand) return
@@ -130,9 +130,7 @@ class DungeonCopilot {
changeNextStep("")
}
- private fun isEnabled(): Boolean {
- return LorenzUtils.inDungeons && config.enabled
- }
+ private fun isEnabled(): Boolean = DungeonAPI.inDungeon() && config.enabled
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
index 57afa54cb..26a293a20 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt
@@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.utils.ChatUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.StringUtils.matches
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -97,7 +96,5 @@ class DungeonDeathCounter {
)
}
- private fun isEnabled(): Boolean {
- return LorenzUtils.inDungeons && SkyHanniMod.feature.dungeon.deathCounterDisplay
- }
+ private fun isEnabled(): Boolean = DungeonAPI.inDungeon() && SkyHanniMod.feature.dungeon.deathCounterDisplay
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
index 82002040c..f100e9cff 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt
@@ -12,7 +12,6 @@ import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
import at.hannibal2.skyhanni.utils.LorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.entity.Entity
import net.minecraft.entity.item.EntityArmorStand
@@ -57,7 +56,7 @@ class DungeonHideItems {
@SubscribeEvent
fun onCheckRender(event: CheckRenderEntityEvent<*>) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
val entity = event.entity
@@ -167,7 +166,7 @@ class DungeonHideItems {
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!config.hideSuperboomTNT && !config.hideReviveStone) return
val packetLocation = event.location
@@ -186,7 +185,7 @@ class DungeonHideItems {
@SubscribeEvent
fun onEntityMove(event: EntityMoveEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
val entity = event.entity
if (entity !is EntityArmorStand) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt
index a3381744c..9d030e528 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt
@@ -8,7 +8,6 @@ import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.utils.BlockUtils
import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt
import at.hannibal2.skyhanni.utils.LorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.drawColor
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
@@ -31,7 +30,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onChat(event: LorenzChatEvent) {
if (!SkyHanniMod.feature.dungeon.highlightClickedBlocks) return
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (event.message == "§cYou hear the sound of something opening...") {
event.blockedReason = "dungeon_highlight_clicked_block"
@@ -41,7 +40,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onBlockClick(event: BlockClickEvent) {
if (!SkyHanniMod.feature.dungeon.highlightClickedBlocks) return
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (DungeonAPI.inBossRoom) return
if (event.clickType != ClickType.RIGHT_CLICK) return
@@ -76,7 +75,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onWorldRender(event: LorenzRenderWorldEvent) {
if (!SkyHanniMod.feature.dungeon.highlightClickedBlocks) return
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
blocks.removeAll { System.currentTimeMillis() > it.time + 3000 }
blocks.forEach {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
index 30e3dbc5e..4d4bb6804 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt
@@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzColor.Companion.toLorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
@@ -135,7 +134,7 @@ object DungeonLividFinder {
}
private fun inDungeon(): Boolean {
- if (!LorenzUtils.inDungeons) return false
+ if (!DungeonAPI.inDungeon()) return false
if (!DungeonAPI.inBossRoom) return false
if (!DungeonAPI.isOneOf("F5", "M5")) return false
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
index bdd681b72..161f263d1 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt
@@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.StringUtils.matches
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
@@ -81,5 +80,5 @@ object DungeonMilestonesDisplay {
)
}
- private fun isEnabled() = LorenzUtils.inDungeons && config.showMilestonesDisplay
+ private fun isEnabled() = DungeonAPI.inDungeon() && config.showMilestonesDisplay
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt
index 5df34421b..3e0a719fa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonRankTabListColor.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.dungeon
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.TabListLineRenderEvent
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal
import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -31,5 +30,5 @@ class DungeonRankTabListColor {
}
}
- fun isEnabled() = LorenzUtils.inDungeons && config.coloredClassLevel
+ fun isEnabled() = DungeonAPI.inDungeon() && config.coloredClassLevel
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
index 26144f940..af5f21eae 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonShadowAssassinNotification.kt
@@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.TitleManager
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.mixins.transformers.AccessorWorldBoarderPacket
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SoundUtils
import net.minecraft.network.play.server.S44PacketWorldBorder
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -28,5 +27,5 @@ class DungeonShadowAssassinNotification {
}
}
- private fun isEnabled() = LorenzUtils.inDungeons && config.shadowAssassinJumpNotifier
+ private fun isEnabled() = DungeonAPI.inDungeon() && config.shadowAssassinJumpNotifier
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt
index 33eabaff1..2575d4431 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonTeammateOutlines.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.features.dungeon
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent
-import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.client.Minecraft
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.client.gui.FontRenderer
@@ -22,7 +21,7 @@ class DungeonTeammateOutlines {
}
}
- private fun isEnabled() = LorenzUtils.inSkyBlock && LorenzUtils.inDungeons && config.highlightTeammates
+ private fun isEnabled() = DungeonAPI.inDungeon() && config.highlightTeammates
private fun getEntityOutlineColor(entity: Entity): Int? {
if (entity !is EntityOtherPlayerMP || entity.team == null) return null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt
index 73ac51d21..6aba8843f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/HighlightDungeonDeathmite.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
import at.hannibal2.skyhanni.utils.LorenzColor
-import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.entity.monster.EntitySilverfish
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -13,7 +12,7 @@ class HighlightDungeonDeathmite {
@SubscribeEvent
fun onEntityHealthUpdate(event: EntityMaxHealthUpdateEvent) {
- if (!LorenzUtils.inDungeons) return
+ if (!DungeonAPI.inDungeon()) return
if (!SkyHanniMod.feature.dungeon.highlightDeathmites) return
val entity = event.entity
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
index a0e923820..747331ad8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/TerracottaPhase.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent
import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
-import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.entity.EntityLivingBase
import net.minecraftforge.fml.common.eventhandler.EventPriority
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -46,5 +45,5 @@ class TerracottaPhase {
private fun isActive() = isEnabled() && inTerracottaPhase
private fun isEnabled() =
- LorenzUtils.inDungeons && DungeonAPI.inBossRoom && DungeonAPI.getCurrentBoss() == DungeonFloor.F6
+ DungeonAPI.inDungeon() && DungeonAPI.inBossRoom && DungeonAPI.getCurrentBoss() == DungeonFloor.F6
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt
index 1fdb7ad16..fd074e66c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fame/ReminderUtils.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.fame
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.garden.contest.FarmingContestAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -8,5 +9,5 @@ object ReminderUtils {
// TODO: add arachne fight, add slayer boss spawned
fun isBusy(): Boolean =
- LorenzUtils.inDungeons || LorenzUtils.inKuudraFight || FarmingContestAPI.inContest || RiftAPI.inRift()
+ DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight || FarmingContestAPI.inContest || RiftAPI.inRift()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
index 381ca097a..bbead46b4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt
@@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent
import at.hannibal2.skyhanni.events.SeaCreatureFishEvent
import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
@@ -94,7 +95,7 @@ class SeaCreatureFeatures {
event.move(2, "fishing.rareSeaCreatureHighlight", "fishing.rareCatches.highlight")
}
- private fun isEnabled() = LorenzUtils.inSkyBlock && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
+ private fun isEnabled() = LorenzUtils.inSkyBlock && !DungeonAPI.inDungeon() && !LorenzUtils.inKuudraFight
private val getEntityOutlineColor: (entity: Entity) -> Int? = { entity ->
if (entity is EntityLivingBase && entity in rareSeaCreatures && entity.distanceToPlayer() < 30) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
index e00ee2397..2bf173ab9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
@@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.data.QuiverAPI.NONE_ARROW_TYPE
import at.hannibal2.skyhanni.data.QuiverAPI.asArrowPercentage
import at.hannibal2.skyhanni.data.ScoreboardData
import at.hannibal2.skyhanni.data.SlayerAPI
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.arrowConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.devConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.displayConfig
@@ -28,7 +29,6 @@ import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.LorenzUtils.inAdvancedMiningIsland
import at.hannibal2.skyhanni.utils.LorenzUtils.inAnyIsland
-import at.hannibal2.skyhanni.utils.LorenzUtils.inDungeons
import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.NumberUtil.percentageColor
import at.hannibal2.skyhanni.utils.RenderUtils.HorizontalAlignment
@@ -754,7 +754,7 @@ private fun getPartyDisplayPair() =
listOf(title, *partyList).map { it to HorizontalAlignment.LEFT }
}
-private fun getPartyShowWhen() = if (inDungeons) {
+private fun getPartyShowWhen() = if (DungeonAPI.inDungeon()) {
false // Hidden bc the scoreboard lines already exist
} else {
if (partyConfig.showPartyEverywhere) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
index 1722cd431..6e21e7610 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.gui.customscoreboard
import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ScoreboardData
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard.Companion.eventsConfig
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardEvents.VOTING
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
@@ -10,7 +11,6 @@ import at.hannibal2.skyhanni.features.misc.ServerRestartTitle
import at.hannibal2.skyhanni.features.rift.area.stillgorechateau.RiftBloodEffigies
import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter
import at.hannibal2.skyhanni.utils.LorenzUtils.inAdvancedMiningIsland
-import at.hannibal2.skyhanni.utils.LorenzUtils.inDungeons
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.StringUtils.anyMatches
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
@@ -260,9 +260,7 @@ private fun getDungeonsLines() = listOf(
getSbLines().filter { line -> patterns.any { it.matches(line) } }.map { it.removePrefix("§r") }
}
-private fun getDungeonsShowWhen(): Boolean {
- return IslandType.CATACOMBS.isInIsland() || inDungeons
-}
+private fun getDungeonsShowWhen(): Boolean = DungeonAPI.inDungeon()
private fun getKuudraLines() = listOf(
SbPattern.autoClosingPattern,
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt
index 80d3c390a..9ad8be984 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt
@@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryOpenEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue
import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValueCalculator
import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList
@@ -41,7 +42,7 @@ class ChestValue {
@SubscribeEvent
fun onBackgroundDraw(event: GuiRenderEvent.ChestGuiOverlayRenderEvent) {
if (!isEnabled()) return
- if (LorenzUtils.inDungeons && !config.enableInDungeons) return
+ if (DungeonAPI.inDungeon() && !config.enableInDungeons) return
if (InventoryUtils.openInventoryName() == "") return
if (!config.showDuringEstimatedItemValue) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
index fb6b837aa..24b073d30 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.InventoryUtils.getAllItems
@@ -59,7 +60,7 @@ class BazaarApi {
if (!LorenzUtils.inSkyBlock) return
if (NEUItems.neuHasFocus()) return
if (LorenzUtils.noTradeMode) return
- if (LorenzUtils.inDungeons || LorenzUtils.inKuudraFight) return
+ if (DungeonAPI.inDungeon() || LorenzUtils.inKuudraFight) return
ChatUtils.sendCommandToServer("bz ${displayName.removeColor()}")
if (amount != -1) OSUtils.copyToClipboard(amount.toString())
currentSearchedItem = displayName.removeColor()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
index d8e9fdd03..2787215f0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
@@ -127,7 +127,7 @@ enum class ItemAbility(
private fun ItemAbility.getMageCooldownReduction(): Double? {
if (ignoreMageCooldownReduction) return null
- if (!LorenzUtils.inDungeons) return null
+ if (!DungeonAPI.inDungeon()) return null
if (DungeonAPI.playerClass != DungeonAPI.DungeonClass.MAGE) return null
var abilityCooldownMultiplier = 1.0
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
index d5387f27c..d3f4a1a3d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
@@ -271,5 +272,5 @@ class NonGodPotEffectDisplay {
}
private fun isEnabled() =
- LorenzUtils.inSkyBlock && config.nonGodPotEffectDisplay && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
+ LorenzUtils.inSkyBlock && config.nonGodPotEffectDisplay && !DungeonAPI.inDungeon() && !LorenzUtils.inKuudraFight
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
index 3101ec039..c5c30a09e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ParticleHider.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.utils.EntityUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.entity.projectile.EntitySmallFireball
import net.minecraft.util.EnumParticleTypes
@@ -13,7 +12,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class ParticleHider {
- private fun inM7Boss() = LorenzUtils.inDungeons && DungeonAPI.dungeonFloor == "M7" && DungeonAPI.inBossRoom
+ private fun inM7Boss() = DungeonAPI.inDungeon() && DungeonAPI.dungeonFloor == "M7" && DungeonAPI.inBossRoom
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt
index 9780c203b..1aac53222 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt
@@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.enums.OutsideSbFeature
import at.hannibal2.skyhanni.data.PartyAPI
import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SpecialColour
import net.minecraft.client.entity.EntityOtherPlayerMP
@@ -22,7 +23,7 @@ class PartyMemberOutlines {
}
fun isEnabled() = config.enabled &&
- (LorenzUtils.inSkyBlock || OutsideSbFeature.HIGHLIGHT_PARTY_MEMBERS.isSelected()) && !LorenzUtils.inDungeons
+ (LorenzUtils.inSkyBlock || OutsideSbFeature.HIGHLIGHT_PARTY_MEMBERS.isSelected()) && !DungeonAPI.inDungeon()
private fun getEntityOutlineColor(entity: Entity): Int? {
if (entity !is EntityOtherPlayerMP || !PartyAPI.partyMembers.contains(entity.name)) return null
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
index 021213117..817dd26b6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.data.PartyAPI
import at.hannibal2.skyhanni.data.jsonobjects.repo.ContributorListJson
import at.hannibal2.skyhanni.events.RepositoryReloadEvent
import at.hannibal2.skyhanni.features.bingo.BingoAPI
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.test.command.ErrorManager
@@ -42,7 +43,7 @@ object AdvancedPlayerList {
fun newSorting(original: List<String>): List<String> {
if (LorenzUtils.inKuudraFight) return original
- if (LorenzUtils.inDungeons) return original
+ if (DungeonAPI.inDungeon()) return original
if (ignoreCustomTabList()) return original
val newList = mutableListOf<String>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
index 60c749ef2..107f7e0c9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper
import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy
import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha
@@ -68,7 +69,7 @@ class SlayerMiniBossFeatures {
}
}
- private fun isEnabled() = LorenzUtils.inSkyBlock && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
+ private fun isEnabled() = LorenzUtils.inSkyBlock && !DungeonAPI.inDungeon() && !LorenzUtils.inKuudraFight
enum class SlayerMiniBossType(val clazz: Class<out EntityCreature>, vararg val health: Int) {
REVENANT(EntityZombie::class.java, 24_000, 90_000, 360_000, 600_000, 2_400_000),
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
index c9b90d738..494fe1efa 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
@@ -1,7 +1,8 @@
package at.hannibal2.skyhanni.utils
-import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent
import at.hannibal2.skyhanni.data.mob.MobFilter.isRealPlayer
+import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
import at.hannibal2.skyhanni.utils.LocationUtils.canBeSeen
import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo
@@ -123,7 +124,7 @@ object EntityUtils {
val derpyMultiplier = if (LorenzUtils.isDerpy) 2 else 1
if (maxHealth == health * derpyMultiplier) return true
- if (!boss && !LorenzUtils.inDungeons) {
+ if (!boss && !DungeonAPI.inDungeon()) {
// Corrupted
if (maxHealth == health * 3 * derpyMultiplier) return true
// Runic
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/JsonUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/JsonUtils.kt
index 81f6e82fd..f9a279c46 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/JsonUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/JsonUtils.kt
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.utils
import com.google.gson.Gson
import com.google.gson.JsonElement
-import com.google.gson.JsonObject
import java.io.Reader
import kotlin.reflect.jvm.javaType
import kotlin.reflect.typeOf
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index d0064c4b9..c292abafd 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -51,10 +51,11 @@ object LorenzUtils {
val inHypixelLobby get() = onHypixel && HypixelData.inLobby
- val inDungeons get() = inSkyBlock && DungeonAPI.inDungeon()
+ @Deprecated("Use DungeonAPI.inDungeon() instead", ReplaceWith("DungeonAPI.inDungeon()"))
+ val inDungeons get() = DungeonAPI.inDungeon()
/**
- * Consider using IslandType.isInIsland() instead
+ * Consider using [IslandType.isInIsland] instead
*/
val skyBlockIsland get() = HypixelData.skyBlockIsland