mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 13:31:43 +01:00
Fix non-aggressive targeting not stopping when within range of the target
This commit is contained in:
parent
79a53b45a6
commit
fa3fbe7be1
@ -105,8 +105,9 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
if (cancelReason != null) {
|
||||
return true;
|
||||
}
|
||||
if (!aggro && distanceSquared() < parameters.distanceMargin()) {
|
||||
if (!aggro && distanceSquared() <= parameters.distanceMargin()) {
|
||||
stop();
|
||||
return false;
|
||||
} else if (updateCounter++ > parameters.updatePathRate()) {
|
||||
targetNavigator.setPath();
|
||||
updateCounter = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user