diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-02-13 01:21:50 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-02-13 01:21:50 +0100 |
commit | 40f7986a110c31d857d2cc7a7f7a802e619faf99 (patch) | |
tree | df9393254aed85d2f9c24635cec04a7681a0c036 /src/main/java/net/minecraft/server/EntityEgg.java | |
parent | f789c9e744ca0fdb6f8cbb1afb71bd94f03406ec (diff) | |
download | craftbukkit-40f7986a110c31d857d2cc7a7f7a802e619faf99.tar craftbukkit-40f7986a110c31d857d2cc7a7f7a802e619faf99.tar.gz craftbukkit-40f7986a110c31d857d2cc7a7f7a802e619faf99.tar.lz craftbukkit-40f7986a110c31d857d2cc7a7f7a802e619faf99.tar.xz craftbukkit-40f7986a110c31d857d2cc7a7f7a802e619faf99.zip |
Make the spawning listen to the server spawn-settings
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityEgg.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityEgg.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java index e7f542af..adb823e1 100644 --- a/src/main/java/net/minecraft/server/EntityEgg.java +++ b/src/main/java/net/minecraft/server/EntityEgg.java @@ -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 |