How to write EntityPlayer AI (BOSS)

Discussion in 'Spigot Plugin Development' started by chunza2542, Jun 1, 2017.

  1. I want to make a boss plugin by spawn some EntityPlayer (Boss). When players walk into the boss zone I want to make boss damage (hit) that player. How can I do this?

    Thx!
     
  2. Simple AI: Finite state machine
    More advanced: GOAP implementation

    But honestly if you only want to target the player if he comes within a radius you dont really need an AI implementation.
     
  3. You could use NMS to make it.
    Take a look at;

    https://www.spigotmc.org/threads/tutorial-register-and-use-nms-entities-1-8.77607/
    https://www.spigotmc.org/threads/nms-tutorials-2-custom-nms-entities-1-11.205192/
    https://www.spigotmc.org/threads/tutorial-creating-custom-entities-with-pathfindergoals.18519/
     
  4. give it pathfinder goals (attack players)