aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index 4e80bdbea..7e1800931 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -213,10 +213,8 @@ object GardenAPI {
private var lastLocation: LorenzVec? = null
- @SubscribeEvent
+ @HandleEvent(onlyOnIsland = IslandType.GARDEN)
fun onBlockClick(event: BlockClickEvent) {
- if (!inGarden()) return
-
val blockState = event.getBlockState
val cropBroken = blockState.getCropType() ?: return
if (cropBroken.multiplier == 1 && blockState.isBabyCrop()) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt
index ff9af9cff..bd8636b9f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt
@@ -1,7 +1,9 @@
package at.hannibal2.skyhanni.features.garden.pests
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.data.ClickType
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.ItemClickEvent
import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
@@ -33,7 +35,7 @@ object PestParticleLine {
private var lastPestTrackerUse = SimpleTimeMark.farPast()
private val locations = mutableListOf<MutableList<ParticleLocation>>()
- @SubscribeEvent
+ @HandleEvent(onlyOnIsland = IslandType.GARDEN)
fun onItemClick(event: ItemClickEvent) {
if (!isEnabled()) return
if (PestAPI.hasVacuumInHand()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
index 6056c054e..33c9dbea2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt
@@ -48,7 +48,7 @@ object PestParticleWaypoint {
private var isPointingToPest = false
private var color: Color? = null
- @SubscribeEvent
+ @HandleEvent(onlyOnIsland = IslandType.GARDEN)
fun onItemClick(event: ItemClickEvent) {
if (!isEnabled()) return
if (PestAPI.hasVacuumInHand()) {