This commit is contained in:
fullwall 2012-09-07 20:28:09 +08:00
parent b69b6091b6
commit 2a33588a85
2 changed files with 3 additions and 2 deletions

View File

@ -406,6 +406,7 @@ public class NPCCommands {
continue; continue;
Messaging.send(sender, " <e>- <a>" + trait.getName() + "<e>"); Messaging.send(sender, " <e>- <a>" + trait.getName() + "<e>");
} }
npc.getNavigator().setTarget((LivingEntity) sender, false);
} }
@Command( @Command(

View File

@ -77,10 +77,10 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
if (npc == null) if (npc == null)
return; return;
Navigation navigation = getNavigation(); Navigation navigation = getNavigation();
if (!navigation.f() || npc.getNavigator().isNavigating()) { if (!navigation.f()) {
navigation.e(); navigation.e();
moveOnCurrentHeading(); moveOnCurrentHeading();
} else if (motX != 0 || motZ != 0 || motY != 0) { } else if (!npc.getNavigator().isNavigating() && (motX != 0 || motZ != 0 || motY != 0)) {
e(0, 0);// is this necessary? it does gravity/controllable but e(0, 0);// is this necessary? it does gravity/controllable but
// sometimes players sink into the ground // sometimes players sink into the ground
} }