summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-06-09 17:05:56 -0400
committerEvilSeph <evilseph@unaligned.org>2011-06-09 18:42:30 -0400
commitf627b69be95fcc346fea21c5e25d0d95ca4cff74 (patch)
treebfe49e7582ce46f57e4821b317a215f46ea825ea /src/main/java
parentbaa92bdd06e7d276339128ef69fc5bd53298f181 (diff)
downloadcraftbukkit-f627b69be95fcc346fea21c5e25d0d95ca4cff74.tar
craftbukkit-f627b69be95fcc346fea21c5e25d0d95ca4cff74.tar.gz
craftbukkit-f627b69be95fcc346fea21c5e25d0d95ca4cff74.tar.lz
craftbukkit-f627b69be95fcc346fea21c5e25d0d95ca4cff74.tar.xz
craftbukkit-f627b69be95fcc346fea21c5e25d0d95ca4cff74.zip
Improved CreatureSpawnEvent and made Water Animals obey spawn-animals setting.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/World.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index aa4ac1fd..c2b79fb9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -821,6 +821,10 @@ public class World implements IBlockAccess {
return false;
}
}
+
+ if (entity instanceof EntityLiving && entity instanceof EntityWaterAnimal && !this.allowAnimals) {
+ return false;
+ }
// CraftBukkit end
if (!flag && !this.isChunkLoaded(i, j)) {
@@ -1934,13 +1938,6 @@ public class World implements IBlockAccess {
for (int i = 0; i < list.size(); ++i) {
entity = (Entity) list.get(i);
- if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
- CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
- if (event.isCancelled()) {
- continue;
- }
- }
-
this.entityList.add(entity);
// CraftBukkit end