diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-10-31 11:18:41 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-31 13:01:48 -0400 |
commit | f479aa84a467f8b684d9f8885165a4ef891def13 (patch) | |
tree | 78f1245e639c52c3864f9b27354e4559413d477f /src/main/java/net/minecraft | |
parent | 46d7cd1e0502edbbca323b2a289a49fbf951628d (diff) | |
download | craftbukkit-f479aa84a467f8b684d9f8885165a4ef891def13.tar craftbukkit-f479aa84a467f8b684d9f8885165a4ef891def13.tar.gz craftbukkit-f479aa84a467f8b684d9f8885165a4ef891def13.tar.lz craftbukkit-f479aa84a467f8b684d9f8885165a4ef891def13.tar.xz craftbukkit-f479aa84a467f8b684d9f8885165a4ef891def13.zip |
Implement API for ambient mob spawn limit. Add spawn-limit.ambient to
bukkit.yml. Adds BUKKIT-2765
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/SpawnerCreature.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java index 52f9323e..3ae2e830 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -69,7 +69,7 @@ public final class SpawnerCreature { EnumCreatureType enumcreaturetype = aenumcreaturetype[j1]; // CraftBukkit start - use per-world spawn limits - int limit = 0; + int limit = enumcreaturetype.b(); switch (enumcreaturetype) { case MONSTER: limit = worldserver.getWorld().getMonsterSpawnLimit(); @@ -80,6 +80,9 @@ public final class SpawnerCreature { case WATER_CREATURE: limit = worldserver.getWorld().getWaterAnimalSpawnLimit(); break; + case AMBIENT: + limit = worldserver.getWorld().getAmbientSpawnLimit(); + break; } if (limit == 0) { |