Give mobs a direction to walk

Discussion in 'Plugin Development' started by Robin Bi, May 29, 2014.

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

    Robin Bi

    Hi!

    So for a minigame i've got to have mobs walking through a cliff. From the one side, to the other side. In addition to this, they should attack players who attack them. So they're kinda passive.
    But for the beginning, it would be nice to just have some mobs walking. Does anyone know how to do this? I've not found good approaches.


    Thanks :3
     
  2. Robin Bi The term for mobs that won't attack but will fight back is "neutral" ;)

    As for the moving thing, you'll want to look into pathfinding. A quick search found this library, but there may well be more things if you look for it.
     
  3. Offline

    Azubuso

    Robin Bi Override whatever mob you need's NMS class, and change their pathfinding to what you're looking for. Here's a little example I used to play around with villagers, basically right clicking a villager with a diamond makes him run in random directions.
    http://pastebin.com/GyK1FVQU
     
  4. Offline

    Robin Bi

    Azubuso Thanks for your code there, but this is waaaaay to hard for a newbie like me ^^
    So i decided to work with the lib you told me, AdamQpzm because it seems easier to work with. But unfortunately, it's kinda hard as well... If you have experience with the lib you might be able to help me. If so, please click here.

    Thanks quite a bunch :)
     
  5. Robin Bi Unfortunately I do not have any experience with that library, I merely found it with a search. If nobody has responded to your post by later tonight, I'll be sure to look into it a little more if I have the time. :)
     
  6. Offline

    Robin Bi

    AdamQpzm I appreciate your time you spend here helping meh <3
     
    AdamQpzm likes this.
  7. Offline

    Robin Bi

    AdamQpzm I really don't wanna be rude, but did you have the time to look into the lib? :3
     
Thread Status:
Not open for further replies.

Share This Page