Mob spawner that spawn custom Mobs

Discussion in 'Plugin Development' started by Smif, Jul 21, 2021.

  1. Offline


    Hey guys,
    I have a question: I made a very simple (im planning to make it more complex, if the spawner will work :D) custom mob with:

    public class SZombie extends EntityZombie {
    public SZombie(Location loc){
    super(((CraftWorld)loc.getWorld()).getHandle()); this.setCustomName(new ChatComponentText(ChatColor.GOLD +"Zombie")); this.setPosition(loc.getX(),loc.getY(),loc.getZ()); this.setCustomNameVisible(true); this.setHealth(2);}

    Now I'd like to create a spawner, which automaticly spawns them is this somehow easy doable and yes how?
    It would be great, if the spawners would still work, after a server reload

    Best greetings,
  2. Offline


  3. Offline


    Thx for your reply!

    Unfortunally this is not exactly what I am looking for. As far as I've understood it, it spawns Mobs with custom items but i want a spawner, which spawns Mobs of a custom class, which i created.

    The solution doesn't have to be a minecraft mob spawner block at the end. I'd be totally fine if the mobs would just spawn like every 30 seconds at a given location. I've found a solution, which lets custom mobs spawn naturally, but there you cant precise define, at which location the mob shall spawn repeatitly.
  4. Offline


    If you just want to spawn mobs at a location every n seconds, is there a problem with a timer (BukkitRunnable)?

Share This Page