aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-02-19 16:32:50 +0100
committerGitHub <noreply@github.com>2024-02-19 16:32:50 +0100
commit9d6ae65895063a7f5cce54c90edd1d946ad083b3 (patch)
tree271d3d9465f1c1ea0ccdbae76887ae588ef65c81 /src
parent87b5d2fa37d0dec89b8838aa6f3f9cfa46891d09 (diff)
downloadskyhanni-9d6ae65895063a7f5cce54c90edd1d946ad083b3.tar.gz
skyhanni-9d6ae65895063a7f5cce54c90edd1d946ad083b3.tar.bz2
skyhanni-9d6ae65895063a7f5cce54c90edd1d946ad083b3.zip
Fix Sheep pet triggering geyser box and fixed particles being permanently hidden after throwing bobber at it once. #1022
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
index dd38b96f1..da46ec7b2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt
@@ -4,9 +4,11 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.FishingBobberCastEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
+import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.drawFilledBoundingBox_nea
@@ -27,7 +29,8 @@ class GeyserFishing {
@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
fun onReceiveParticle(event: ReceiveParticleEvent) {
- if (!shouldProcessParticles() || event.type != EnumParticleTypes.CLOUD) return
+ if (!shouldProcessParticles()) return
+ if (event.type != EnumParticleTypes.CLOUD || event.count != 15 || event.speed != 0.05f || event.offset != LorenzVec(0.1f, 0.6f, 0.1f)) return
geyser = event.location
val potentialGeyser = geyser ?: return
@@ -55,6 +58,16 @@ class GeyserFishing {
}
@SubscribeEvent
+ fun onTick(event: LorenzTickEvent) {
+ if (!shouldProcessParticles()) return
+ val bobber = bobber ?: return
+ if (bobber.isDead) {
+ this.bobber = null
+ return
+ }
+ }
+
+ @SubscribeEvent
fun onRenderWorld(event: LorenzRenderWorldEvent) {
if (!config.drawBox || !IslandType.CRIMSON_ISLE.isInIsland()) return
val geyserBox = geyserBox ?: return
@@ -71,5 +84,5 @@ class GeyserFishing {
}
}
- private fun shouldProcessParticles() = IslandType.CRIMSON_ISLE.isInIsland() && (config.hideParticles || config.drawBox)
+ private fun shouldProcessParticles() = IslandType.CRIMSON_ISLE.isInIsland() && LorenzUtils.skyBlockArea == "Blazing Volcano" && (config.hideParticles || config.drawBox)
}