From 7d6503b05de3a2db7af247c0cc32b341bf636a37 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:49:17 +0200 Subject: Fixed lever clicks get highlighted in water room. --- src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt | 2 ++ .../skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'src/main/java/at') 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 36ab4e3d8..a3129ad8c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -93,6 +93,8 @@ class DungeonAPI { val floor = dungeonFloor ?: return null return DungeonFloor.valueOf(floor.replace("M", "F")) } + + fun getFloorId() = ScoreboardData.sidebarLines.firstOrNull()?.removeColor()?.split(" ")?.getOrNull(2) } @SubscribeEvent 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 11b36e454..fa3592940 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt @@ -55,6 +55,11 @@ class DungeonHighlightClickedBlocks { else -> return } + // Water room + if (DungeonAPI.getFloorId() == "-60,-60") { + return + } + if (type == ClickedBlockType.WITHER_ESSENCE) { val text = BlockUtils.getTextureFromSkull(position.toBlocPos()) if (text != "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQ" + -- cgit