Fix cancellation order for updateMountedStatus

This commit is contained in:
fullwall 2016-04-02 12:00:49 +08:00
parent f4c28e9085
commit 2863d4b64c

View File

@ -282,7 +282,6 @@ public class CitizensNavigator implements Navigator, Runnable {
Entity vehicle = NMS.getBukkitVehicle(npc.getEntity()); Entity vehicle = NMS.getBukkitVehicle(npc.getEntity());
if (!(vehicle instanceof NPCHolder)) if (!(vehicle instanceof NPCHolder))
return; return;
cancelNavigation();
NPC mount = ((NPCHolder) vehicle).getNPC(); NPC mount = ((NPCHolder) vehicle).getNPC();
switch (getTargetType()) { switch (getTargetType()) {
case ENTITY: case ENTITY:
@ -294,6 +293,7 @@ public class CitizensNavigator implements Navigator, Runnable {
default: default:
return; return;
} }
cancelNavigation();
} }
private void updatePathfindingRange() { private void updatePathfindingRange() {