From 0f659850b2c5ae796db187cc78cecbd8f687462c Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sun, 11 Mar 2012 06:28:03 -0400 Subject: Made golems spawning respect spawn-animals for real. Fixes BUKKIT-1124 --- src/main/java/net/minecraft/server/World.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/net/minecraft/server/World.java') diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 8a7be687..976dbe0c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -880,10 +880,10 @@ public class World implements IBlockAccess { // CraftBukkit start if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) { - boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal; + boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal || entity instanceof EntityGolem; boolean isMonster = entity instanceof EntityMonster || entity instanceof EntityGhast || entity instanceof EntitySlime; - if (spawnReason == SpawnReason.NATURAL || spawnReason == SpawnReason.CHUNK_GEN || spawnReason == SpawnReason.JOCKEY || spawnReason == SpawnReason.SPAWNER || spawnReason == SpawnReason.BED || spawnReason == SpawnReason.EGG || spawnReason == SpawnReason.VILLAGE_INVASION || spawnReason == SpawnReason.VILLAGE_DEFENSE) { + if (spawnReason == SpawnReason.NATURAL || spawnReason == SpawnReason.CHUNK_GEN || spawnReason == SpawnReason.JOCKEY || spawnReason == SpawnReason.SPAWNER || spawnReason == SpawnReason.BED || spawnReason == SpawnReason.EGG || spawnReason == SpawnReason.VILLAGE_INVASION || spawnReason == SpawnReason.VILLAGE_DEFENSE || spawnReason == SpawnReason.BUILD_SNOWMAN || spawnReason == SpawnReason.BUILD_IRONGOLEM) { if (isAnimal && !allowAnimals || isMonster && !allowMonsters) return false; } -- cgit v1.2.3