mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Set pathfinding range on strategy switch
This commit is contained in:
parent
7229958dcf
commit
c538a18471
@ -143,6 +143,7 @@ public class CitizensNavigator implements Navigator, Runnable {
|
||||
return;
|
||||
}
|
||||
localParams = defaultParams.clone();
|
||||
updatePathfindingRange();
|
||||
PathStrategy newStrategy = new MCTargetStrategy(npc, target, aggressive, localParams);
|
||||
switchStrategyTo(newStrategy);
|
||||
}
|
||||
@ -161,6 +162,7 @@ public class CitizensNavigator implements Navigator, Runnable {
|
||||
return;
|
||||
}
|
||||
localParams = defaultParams.clone();
|
||||
updatePathfindingRange();
|
||||
PathStrategy newStrategy;
|
||||
if (localParams.useNewPathfinder()) {
|
||||
newStrategy = new AStarNavigationStrategy(npc, target, localParams);
|
||||
|
Loading…
Reference in New Issue
Block a user