Solved Need help with mob spawning

Discussion in 'Plugin Development' started by Ghilliedrone, Jul 27, 2013.

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


    I need help with a few things
    • How do i check if its night
    • How to have a mob spawn and follow a random player
    • How to have a mob ride another mob
  2. Offline


    • Using the World object you can get the current time and then determine if it's night or day.
    • Quite tricky this, you'd have to create a custom entity or use one of the libraries, I think Kumpleblase's one is the most up to date and can be found in the resources section.
    • You can set the passenger of an entity allowing players to ride mobs, not sure if this can work the other way around though.
    Ghilliedrone likes this.
  3. Offline


    I can't seem to find that library anywhere. :confused:
  4. Offline


  5. Offline


    I use a custom AI (Although not really custom just a bit of NMS magic)that makes them walk to the players. You dont need a dependency on other plugins. This may break after updates but you just need to find what .a was renamed to.
    public void walkTo(LivingEntity le, float speed, Player player) {
            Location l = player.getLocation();
            ((EntityInsentient) ((CraftLivingEntity) le).getHandle()).getNavigation().a(l.getX(), l.getY(), l.getZ(), 1.25F);
    You need to put this on a bukkit task once you spawn them and it will follow the player.
Thread Status:
Not open for further replies.

Share This Page