Allow mob spawner spawning without players near?

Discussion in 'Spigot Plugin Development' started by VivianMusic, Aug 2, 2018.

  1. I have a mob spawner with an NPC near it and its still not spawning unless I get close to do I make it spawn all the time??
  2. Your best bet is to look for the spawner in say a scheduler and basically create your own spawning script to spawn entities around it. Just get the mob type from the spawner. Unless someone else around here that knows more about the spawner mechanics and would know a way, you really cant tell the spawner to ignore its radius.
    • Agree Agree x 1
  3. Well, in 1.12.2 there's this method

    Code (Text):
                        for(Block b : getNearbyBlocks(spawnLoc, 30)) {
                            if(b.getType().equals(Material.MOB_SPAWNER)) {
                                CreatureSpawner cs = (CreatureSpawner) b.getState();
                                Bukkit.getServer().broadcastMessage("Found a spawner");
                                Bukkit.getServer().broadcastMessage("" + cs.getRequiredPlayerRange());
    but even that doesn't work
  4. You will very likely have to change NMS code to achieve this. At least, for it to not be a lag bomb.