From 8ab90b344c2a510fb7bc7b2bdddc2c5db995c761 Mon Sep 17 00:00:00 2001 From: Tahg Date: Wed, 5 Oct 2011 11:09:41 -0400 Subject: fix for spawners not properly checking whether an entity can spawn --- src/main/java/net/minecraft/server/TileEntityMobSpawner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/net') 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); -- cgit v1.2.3