Archiviert
13
0

Improved CreatureSpawnEvent and made Water Animals obey spawn-animals setting.

Dieser Commit ist enthalten in:
EvilSeph 2011-06-09 17:05:56 -04:00
Ursprung baa92bdd06
Commit f627b69be9

Datei anzeigen

@ -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