mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-13 19:52:05 +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) {
|
if (cancelReason != null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (target.world.getWorld().getFullTime() % 10 == 0) {
|
if (!aggro && distanceSquared() < parameters.distanceMargin()) {
|
||||||
|
stop();
|
||||||
|
} else if (target.world.getWorld().getFullTime() % 10 == 0) {
|
||||||
setPath();
|
setPath();
|
||||||
}
|
}
|
||||||
NMS.look(handle, target);
|
NMS.look(handle, target);
|
||||||
|
Loading…
Reference in New Issue
Block a user