Esempio n. 1
0
 public static void look(Entity handle, Entity target) {
   if (handle instanceof EntityInsentient) {
     ((EntityInsentient) handle)
         .getControllerLook()
         .a(target, 10.0F, ((EntityInsentient) handle).bQ());
   } else if (handle instanceof EntityHumanNPC) {
     ((EntityHumanNPC) handle).setTargetLook(target, 10F, 40F);
   }
 }
Esempio n. 2
0
 public static void setDestination(
     org.bukkit.entity.Entity entity, double x, double y, double z, float speed) {
   Entity handle = NMS.getHandle(entity);
   if (handle == null) return;
   if (handle instanceof EntityInsentient) {
     ((EntityInsentient) handle).getControllerMove().a(x, y, z, speed);
   } else if (handle instanceof EntityHumanNPC) {
     ((EntityHumanNPC) handle).setMoveDestination(x, y, z, speed);
   }
 }