summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-10-05 11:09:41 -0400
committerTahg <tahgtahv@gmail.com>2011-10-05 11:36:02 -0400
commit8ab90b344c2a510fb7bc7b2bdddc2c5db995c761 (patch)
tree45bbeea0e4f104896d75e2b960d4dc566280512b /src/main/java/net
parentd74145ef23455c63f91bd667aa772fa40f0e659a (diff)
downloadcraftbukkit-8ab90b344c2a510fb7bc7b2bdddc2c5db995c761.tar
craftbukkit-8ab90b344c2a510fb7bc7b2bdddc2c5db995c761.tar.gz
craftbukkit-8ab90b344c2a510fb7bc7b2bdddc2c5db995c761.tar.lz
craftbukkit-8ab90b344c2a510fb7bc7b2bdddc2c5db995c761.tar.xz
craftbukkit-8ab90b344c2a510fb7bc7b2bdddc2c5db995c761.zip
fix for spawners not properly checking whether an entity can spawn
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityMobSpawner.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
index 8c3589ff..9f5a0230 100644
--- a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
+++ b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
@@ -84,7 +84,8 @@ public class TileEntityMobSpawner extends TileEntity {
double d5 = (double) this.z + (this.world.random.nextDouble() - this.world.random.nextDouble()) * 4.0D;
entityliving.setPositionRotation(d3, d4, d5, this.world.random.nextFloat() * 360.0F, 0.0F);
- if (entityliving.world.containsEntity(entityliving.boundingBox) && entityliving.world.getEntities(entityliving, entityliving.boundingBox).size() == 0 && !entityliving.world.c(entityliving.boundingBox)) {
+ if ((entityliving instanceof EntityLiving && ((EntityLiving)entityliving).d()) ||
+ (entityliving.world.containsEntity(entityliving.boundingBox) && entityliving.world.getEntities(entityliving, entityliving.boundingBox).size() == 0 && !entityliving.world.c(entityliving.boundingBox))) {
// CraftBukkit end
// CraftBukkit - added a reason for spawning this creature
this.world.addEntity(entityliving, SpawnReason.SPAWNER);