Making an entity go to a location

Discussion in 'Plugin Development' started by NonameSL, Jul 23, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    NonameSL

    I am trying to spawn an entity and making it go to a certain location.

    I have searched all over the internet, and I found so many different solutions...
    • Vectors
    • Navigation.a(double x, double y, double z, double speed)
    • PathfinderGoal
    But they don't work, because with vectors it just launches the entity forward, which is not what I want.
    The navigation way:
    Code:java
    1. EntityInsentient entityIns = (EntityInsentient)((CraftEntity)cow).getHandle();
    2. entityIns.getNavigation().a(loc.getX(), loc.getY(), loc.getZ(), 0.3f);

    Doesn't work at all, it just spawns the entity and it doesn't move until I hit it.
    And I have absolutly no idea how to use the PathfinderGoal thingy.

    Please help! How can I make an entity go to a location?

    Thanks in advance! [cake][cake][cake]
     
Thread Status:
Not open for further replies.

Share This Page