Solved How to spawn an Ender Dragon with AI 1.10?

Discussion in 'Spigot Plugin Development' started by ritolika, Jun 18, 2016.

  1. So basically the setVelocity() function was working as it should and it made the Ender Deagon move, but after I updated the plugin to 1.9, the dragon doesn't get affected by the setVelocity() and just stands still. I reckon it has something to do with the new update, anyone know how to workaround this?

    Edit: Works on all Entitys but not the Ender Dragon

    Edit 2: The problem seems to be that the Ender Dragon spawns with no AI in the OverWorld.

    Code (Text):
    private void moveToward(Entity entity, Location to, double speed){
            Location loc = entity.getLocation();
            double x = loc.getX() - to.getX();
            double y = loc.getY() - to.getY();
            double z = loc.getZ() - to.getZ();
            Vector velocity = new Vector(x, y, z).normalize().multiply(-speed);
    #1 ritolika, Jun 18, 2016
    Last edited: Jun 18, 2016
  2. I have tried recently to make move a sheep with the setVelocity() in 1.9.2 and it works
  3. The problem seems to be the Ender Dragon. It doesn't want to move, seems like it doesn't have an AI
  4. Ha yes, I have summon (with /summon) an EnderDragon in 1.10 with AI and it don't move, it looks down. It must be a bug.
  5. I guess the question is how do I spawn an Ender Dragon with AI?
  6. It seems you want to be spoonfed. I'll have a look at the nms enderdragon.
  7. I wonder if you updated the spoonfeed code with the new nms methods names...


    #9 Grimerlin, Jun 18, 2016
    Last edited: Jun 18, 2016
    • Useful Useful x 1
  8. Oh, I missed that. Well thank you sir.
    • Friendly Friendly x 1