Control Llama

Discussion in 'Plugin Development' started by Spadax, Sep 23, 2017.

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

    Spadax

    Hello, i would like to create a mini-game with a llama. The player will spawn on a llama and will control it. But, i don't understand how a player can control a llama like an horse. Thanks for your help !
     
  2. Offline

    elian1203

  3. Offline

    Zombie_Striker

    @elian1203
    The problem is llamas are not controllable in the base game. That will let them ride the entity, but the player will have no control over its movements.

    @Spadax
    You need to dig into the llama's NMS code and change it so it is controllable. Since NMS is quite complicated, and there are no current tutorials for llamas, I would only recommend you do this if you have already had experience writing NMS.
     
  4. Offline

    Spadax

    Hello @Zombie_Striker , i haven't got an experience in bukkit NMS, it's the probleme and yes, i didn't find a tutorial with the llama. Have you got an idea ?
     
  5. Offline

    Side8StarLite

    Maybe one way, not as complicated as making llamas "controllable" but you would still need to get NMS under your skin. If speed is not a factor, eg no stopping or going, just running around in the direction your player is facing, you could tell the llama to walk to a certain location based on the direction a player is facing. There's an example of the method deep in the bowels of my computer systems, but I'd reckon you'll find the method pretty quick out there on the Internet. Good luck
     
  6. Offline

    MightyOne

    @Spadax it does not matter which entity you want to make ridable. in the end you have to copy the movement methods of EntityHorseAbstract anyway. I have tried to make a cow ridable for 1.12.1 once but it was a mess. It is not that easy
     
Thread Status:
Not open for further replies.

Share This Page