mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-26 11:07:59 +01:00
Respect distanceMargin when NPCs are passively moving towards entities
This commit is contained in:
parent
95993348bd
commit
c1321c2162
@ -114,7 +114,9 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
if (cancelReason != null) {
|
||||
return true;
|
||||
}
|
||||
if (target.world.getWorld().getFullTime() % 10 == 0) {
|
||||
if (!aggro && distanceSquared() < parameters.distanceMargin()) {
|
||||
stop();
|
||||
} else if (target.world.getWorld().getFullTime() % 10 == 0) {
|
||||
setPath();
|
||||
}
|
||||
NMS.look(handle, target);
|
||||
|
Loading…
Reference in New Issue
Block a user