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

@@ -245,8 +245,12 @@ public class EntityEgg extends Entity {
break;
}
entity.c(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
this.world.a(entity);
// The world we're spawning in accepts this creature
boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal;
if ((isAnimal && this.world.L) || (!isAnimal && this.world.K)) {
entity.c(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
this.world.a(entity);
}
}
}
// CraftBukkit end