diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-05 22:40:45 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-05 22:40:45 +0100 |
commit | 0144f643678b8e2a7d472b8df1de87b865e753e7 (patch) | |
tree | 12ac5a49605cd69649f26ad78ee058a4845ec05b /src/main/java | |
parent | bdb91d8fb984ea89c5c05c37cf7c8b132ffb2f79 (diff) | |
download | skyhanni-0144f643678b8e2a7d472b8df1de87b865e753e7.tar.gz skyhanni-0144f643678b8e2a7d472b8df1de87b865e753e7.tar.bz2 skyhanni-0144f643678b8e2a7d472b8df1de87b865e753e7.zip |
No more false positives for diana burrow helper outside the hub.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt | 9 |
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 |