aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-05 22:40:45 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-03-05 22:40:45 +0100
commita7201a79016574e43297e7d9df2e5cd7a3e77686 (patch)
tree12ac5a49605cd69649f26ad78ee058a4845ec05b
parent55ba144ef91c2e701eecf5f0b229721ba1130bdb (diff)
downloadSkyHanni-a7201a79016574e43297e7d9df2e5cd7a3e77686.tar.gz
SkyHanni-a7201a79016574e43297e7d9df2e5cd7a3e77686.tar.bz2
SkyHanni-a7201a79016574e43297e7d9df2e5cd7a3e77686.zip
No more false positives for diana burrow helper outside the hub.
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
index 177f16db2..aff6a5ad5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
@@ -1,8 +1,11 @@
package at.hannibal2.skyhanni.features.event.diana
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.events.SoopyGuessBurrowEvent
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.toLorenzVec
import net.minecraft.util.EnumParticleTypes
@@ -51,6 +54,7 @@ class SoopyGuessBurrow {
@SubscribeEvent
fun onPlaySound(event: PlaySoundEvent) {
+ if (!isEnabled()) return
if (event.soundName != "note.harp") return
val pitch = event.pitch
@@ -131,6 +135,7 @@ class SoopyGuessBurrow {
@SubscribeEvent
fun onReceiveParticle(event: ReceiveParticleEvent) {
+ if (!isEnabled()) return
val type = event.type
if (type != EnumParticleTypes.DRIP_LAVA) return
val currLoc = event.location
@@ -265,4 +270,8 @@ class SoopyGuessBurrow {
}
}
}
+
+ private fun isEnabled(): Boolean {
+ return LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.HUB && SkyHanniMod.feature.diana.burrowsSoopyGuess
+ }
} \ No newline at end of file