How to move a mob?

Discussion in 'Plugin Development' started by darkmage0252, Dec 13, 2011.

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

    darkmage0252

    How would i make a mob walk to a specific location? without teleporting the mob.
     
  2. Offline

    tomjw64

    having the same problem here. You apparently have to make a custom mob class?
     
  3. Offline

    Jaker232

    Set it's vector?
     
  4. Offline

    Coryf88

    Code:java
    1. private void creatureMoveTo(Creature entity, int x, int y, int z) {
    2. ((org.bukkit.craftbukkit.entity.CraftCreature)entity).getHandle().setPathEntity(new net.minecraft.server.PathEntity(new net.minecraft.server.PathPoint[] {new net.minecraft.server.PathPoint(x, y, z)}));
    3. }


    Add craftbukkit-*.jar to your build path.
     
  5. Offline

    AmoebaMan

    Coryf88 There is no way to do this without delving into the black abyss of the Craftbukkit jar?
     
  6. Offline

    Baummann

    There is but it'd be really complicated. Don't bother asking me, I don't know how.
     
  7. Offline

    AmoebaMan

    Just realized that the argument for the PathEntity constructor is an array of PathPoint. Does this imply that you could put multiple points in and that the mob would automatically look to the next point when it reaches the first one?
     
Thread Status:
Not open for further replies.

Share This Page