Control spawn rate?

Discussion in 'Plugin Development' started by Strahan, Sep 9, 2016.

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

    Strahan

    Hi. Is it possible to modify the rate that mobs spawn? I was searching but I haven't found anything beside an example spawning more mobs when the creaturespawn event fires. That'd work I suppose, but I was hoping for a more natural method. Is it possible? Thanks!
     
  2. Offline

    Zombie_Striker

    @Strahan
    You can try canceling the CreatureSpawnEvent if the 'mob limit' has been reached. Use Entity#getNearbyEntities(x,y,z).size() to get the amount of mobs within a radius.
     
  3. Offline

    Strahan

    Hmm. Cancel the event? Wouldn't that reduce mob spawning? I want to increase them actually. More accurately, I want to increase whatever mechanism in the server causes them to spawn. Right now on a creature spawn event I am spawning 5 more mobs and just moving them a random amount of blocks from the original creature spawned. It works, but I wasn't sure if there was a way to naturally increase the rate..?
     
  4. Offline

    JanTuck

    If it works why then look for another way? I dont think there is a natural way. (Increasing difficulty?)
     
  5. Offline

    Strahan

    I was hoping to increase the regular spawn rate so the mobs aren't always close to each other. I guess I can just increase the distance I move them away, but easiest would be to increase the rate.
     
  6. Offline

    JanTuck

    I dont think there is a fully supported way to do this.

    Sent from Tapatalk
     
  7. Online

    timtower Administrator Administrator Moderator

    @JanTuck Depends on what you call supported.
    There are loads of ways to spawn more mobs. Runnables for examples.
     
Thread Status:
Not open for further replies.

Share This Page