How to create custom villager look at player without moving

Discussion in 'Spigot Plugin Development' started by Bolt, Jul 5, 2015.

  1. How do I make a villager frozen with the tag "NoAI" rotate to look at nearby players?
    I've tried creating a custom villager class but I don't know how to make it work. It gets all messed up with the villager becoming seemingly invincible and unable to despawn for some reason.
     
    #1 Bolt, Jul 5, 2015
    Last edited: Jul 6, 2015
  2.  
  3. All those tutorials, they suck. If there was 1 good tutorial, I would link him. For the most, the are outdated, or simple won't work.

    What you have to do is:
    • Create a custom villager class which extends EntityVillager and override the move/g method. You can use pathfinders to make it look to a player.
    • Register the entity (this is the hardest part) if you don't have any cood snippet of registering the entity I would give it do you. Made it myself ^.^
     
  4. If you think all of the current tutorials suck, you seem to know your stuff very well you should create a tutorial yourself :) I would be very interested to read and share it
     
    • Funny Funny x 1
  5. I agree. Although there are a lot. Most are outdated and since most nms methods don't really have relevant names, I can't tell which method or field I'm supposed to change anymore. Thanks for the input though. :) If you do make a tutorial, I'd be glad to share it.
     
  6. @LeePMC @Bolt I never made a tutorial xD. I am now busy with plugins and sometimes I am durping on forums, I'll post a tutorial in about a week I think!
     
  7. If the tutorials suck , they do not call tutorials and some even use the label that do not work anymore
     
    • Funny Funny x 1