Extending entityllama

Discussion in 'Spigot Plugin Development' started by iSoda, May 26, 2017.

  1. Hey, Im trying to extend EntityLlama and make some sort of a pet.
    from what I understood, a() is the activation for the navigation, which one is the navigation itself?
    will it be better to make a pathfinder goal to follow an entity (as its a pet, player in this case.) or should I simply override the navigation and use it to navigate to the player's coordinates?
    my code is bare, literally a llama that looks at the player only. I will attach it soon.
    thanks!
     
  2. You trying to do Mob Riding or Have the Mob Follow the player?

    EDIT: Ok now that I re-read the question, to make the mob navigate to cords it would be easier to use Pathfinders.
     
    #2 brainsynder, May 27, 2017
    Last edited: May 27, 2017
  3. #3 oasis9, May 27, 2017
    Last edited: May 28, 2017
  4. Alright thank you. which method controls the navigation and is executed once a() is true? navigation will make it easier, however, is it better (resources-wise) than making my own pathfinder? (the last part is out of curiosity. )
     
  5. Well I mean, PathfinderGoals just call the entity navigation when it comes to movement. I'd either use the already-existing PathfinderGoalFollowOwners and those (or similar, can't remember the exact names), or if those for whatever reason don't work, create a custom one - shouldn't be too bad. I may've not understood the problem here, though?
     
  6. You did, thank you. going to try it and will update.
    Im still not sure which method I override inside my extended entity class to set its navigation, any help is appriciated.
     
    #6 iSoda, May 27, 2017
    Last edited: May 27, 2017
  7. If you clear the Pathfinders of an entity, then set your own pathfinder it will override the navigation.