From b4943a0e8469c2ece3af1ab8a43bde6e64346067 Mon Sep 17 00:00:00 2001 From: fullwall Date: Fri, 27 Nov 2020 22:45:13 +0800 Subject: [PATCH] Fix some bugs in straight line targeter --- .../main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java b/main/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java index bad282a25..db3a10fa1 100644 --- a/main/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java +++ b/main/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java @@ -231,6 +231,7 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget { } } active = null; + fallback.setPath(); } @Override @@ -245,8 +246,9 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget { public void update() { if (active != null) { active.update(); + } else { + fallback.update(); } - fallback.update(); } }