Make the spawning listen to the server spawn-settings

This commit is contained in:
Erik Broes
2011-02-13 01:21:50 +01:00
parent f789c9e744
commit 40f7986a11
4 changed files with 25 additions and 8 deletions

View File

@@ -49,6 +49,13 @@ public class TileEntityMobSpawner extends TileEntity {
return;
}
// CraftBukkit start - The world we're spawning in accepts this creature
boolean isAnimal = entityliving instanceof EntityAnimal || entityliving instanceof EntityWaterAnimal;
if ((isAnimal && !this.a.L) || (!isAnimal && !this.a.K)) {
return;
}
// CraftBukkit end
int j = this.a.a(entityliving.getClass(), AxisAlignedBB.b((double) this.b, (double) this.c, (double) this.d, (double) (this.b + 1), (double) (this.c + 1), (double) (this.d + 1)).b(8.0D, 4.0D, 8.0D)).size();
if (j >= 6) {