Programmed Mobs

Discussion in 'Spigot Plugin Development' started by moocow9m, Jul 11, 2015.

  1. I would like to program a mob to spawn at an X Y Z coordinate and go to another X Y Z coordinate. Ex: spawn at 0 0 0 and goto 10 5 2. Now the map it spawns on will be pre-made so i want to prerecord steps it takes, make it pause at points, and make it seem real. If anyone knows how to make a mob do this I would appreciate the help.
  2. Creeoer


    Sounds like a job for the NMS library, there are plenty of tutorials on making custom entities using NMS.However it changes every version so it'll be a pain.
    • Agree Agree x 1
  3. I knew it might require the use of NMS but is it possible to make it spawn a mob and target it without interfering with other mobs of the same type?
  4. Creeoer


    Just make a custom entity? You don't have to replace all of them.
  5. I will look into that, thanks. i will post again if it is successful or a failure.
  6. The only thing i can think of without using nms is,
    <EntityType> entity = <EntityType> Bukkit.getW....spawn(location, <EntityType>);
    and then set its velocity to the target location, but ofcourse keep setting that velocity until the target has been achieved.

    Not sure if this would work well but i guess its worth a shot (if you really wanna stay away from NMS)