Skip to content

Commit 06b9175

Browse files
committed
fix: disable sea creature detection in dungeons
1 parent 0a83952 commit 06b9175

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/kotlin/com/github/itsempa/nautilus/data/SeaCreatureDetectionApi.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.data.mob.Mob
66
import at.hannibal2.skyhanni.events.MobEvent
77
import at.hannibal2.skyhanni.events.fishing.SeaCreatureFishEvent
88
import at.hannibal2.skyhanni.events.minecraft.SkyHanniRenderWorldEvent
9+
import at.hannibal2.skyhanni.features.dungeon.DungeonApi
910
import at.hannibal2.skyhanni.features.fishing.FishingApi
1011
import at.hannibal2.skyhanni.features.fishing.SeaCreature
1112
import at.hannibal2.skyhanni.features.fishing.SeaCreatureManager
@@ -64,6 +65,7 @@ object SeaCreatureDetectionApi {
6465

6566
@HandleEvent
6667
fun onMobSpawn(event: MobEvent.Spawn.SkyblockMob) {
68+
if (!isActive()) return // TODO: remove this workaround
6769
val mob = event.mob
6870
val data = entityIdToData[mob.entityId]
6971
if (data != null) {
@@ -259,6 +261,9 @@ object SeaCreatureDetectionApi {
259261
}
260262
}
261263

264+
// TODO: remove workaround
265+
private fun isActive(): Boolean = !DungeonApi.inDungeon()
266+
262267
@HandleEvent
263268
fun onDebug(event: NautilusDebugEvent) {
264269
event.title("Nautilus Sea Creatures")

0 commit comments

Comments
 (0)