aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/moe/nea/sky/features/world/AutoFishing.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/sky/features/world/AutoFishing.kt b/src/main/kotlin/moe/nea/sky/features/world/AutoFishing.kt
index 8e0a0be..487f64d 100644
--- a/src/main/kotlin/moe/nea/sky/features/world/AutoFishing.kt
+++ b/src/main/kotlin/moe/nea/sky/features/world/AutoFishing.kt
@@ -53,6 +53,7 @@ object AutoFishing {
@SubscribeEvent
fun onTick(ev: TickEvent.ClientTickEvent) {
+ if (mc.currentScreen != null) return
if (ev.phase != TickEvent.Phase.END) return
val p = mc.thePlayer ?: return
if (shouldReengage) {
@@ -69,7 +70,7 @@ object AutoFishing {
return
}
if (FishingHelper.getInstance().warningState != FishingHelper.PlayerWarningState.FISH_HOOKED) return
- if (lastFishingHook != p.fishEntity && shouldAutoFish()) {
+ if (lastFishingHook != p.fishEntity && p.fishEntity != null && shouldAutoFish()) {
mc.playerController.sendUseItem(p, p.worldObj, p.heldItem)
lastFishingHook = p.fishEntity
if (config.neuHaxReengageFishingRod) {