From c2858ec81ef7a8c931eababb8010e0a1b8bf1033 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 6 Apr 2014 20:19:15 +0800 Subject: [PATCH] Update MCTargetStrategy.java --- src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java index 2002f4327..168104720 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java +++ b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java @@ -119,7 +119,9 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget { if (cancelReason != null) { return true; } - setPath(); + if (target.getWorld().getWorld().getFullTime() % 10 == 0) { + setPath(); + } NMS.look(handle, target); if (aggro && canAttack()) { AttackStrategy strategy = parameters.attackStrategy(); @@ -252,4 +254,4 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget { P_NAV_J = NMS.getField(PlayerNavigation.class, "j"); P_NAV_M = NMS.getField(PlayerNavigation.class, "m"); } -} \ No newline at end of file +}