Don't use teleport for flying navigation

This commit is contained in:
fullwall 2020-02-23 11:08:51 +08:00
parent efc41dc492
commit 225ede02ce

View File

@ -8,7 +8,6 @@ import org.bukkit.Material;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
@ -161,7 +160,6 @@ public class FlyingAStarNavigationStrategy extends AbstractPathStrategy {
float newYaw = current.getYaw() + normalisedTargetYaw;
current.setYaw(newYaw);
NMS.setHeadYaw(npc.getEntity(), newYaw);
npc.teleport(current, TeleportCause.PLUGIN);
}
parameters.run();
plan.run(npc);