Spawn creature in unloaded chunk?

Discussion in 'Plugin Development' started by Lodran, Apr 3, 2011.

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

    Lodran

    What happens if I repeatedly spawn creatures in an unloaded chunk? Does it cause the chunk to be reloaded, or something else that may degrade server performance?
     
  2. Offline

    Carnes

    Did you figure out what happens?

    /me looks interested
     
  3. Offline

    Gandalf

    Try it.
     
  4. Offline

    Carnes

    After some !!SCIENCE!!

    They exist, but are "dormant" until the chunk is back. Or something like that. I saw no CPU usage increase until returning to the chunk. Though it might not have been a good test because my mobs only react to nearby entities.

    I don't know how MC handles creature despawning though. It's possible that because i kept pointers to each entity spawned that they were preserved from despawning? I couldn't make the entities move though. They existed but in a void.
     
  5. Offline

    Lodran

    It doesn't seem to cause any server instability, and in my case, I won't spawn more than a set maximum at a time.

    Hopefully with that, I'll manage to avoid getting a reputation as "That plugin that crashes servers".
     
  6. Offline

    Carnes

    The only thing you might run into (which happened to me) is if you spawn a lot of monsters in the exact same spot, they "explode" outwards. This might also happen if you are slowly spawning monsters over time at the same Location in an unloaded chunk... since the monsters can't wander away from their spawn point.

    I use your plugin a lot to make quests and dungeon areas. Are you changing it to spawn monsters even when people aren't around? I think that would be cool. Currently i stall the player a bit before reaching a spawner so it has time to populate a little.
     
  7. Offline

    Lodran

    You can adjust spawn settings quite a bit in it now - in particular, if you use /creaturebox requires surface light it'll stop checking for a player. You can also adjust how many it keeps alive at once using /creaturebox limit.
     
Thread Status:
Not open for further replies.

Share This Page