summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-03-11 06:28:03 -0400
committerEvilSeph <evilseph@gmail.com>2012-03-11 06:28:03 -0400
commit0f659850b2c5ae796db187cc78cecbd8f687462c (patch)
tree31d532fa6d573603f0d623c2575343b924624dde /src/main/java/net/minecraft/server
parentfadc93060f64ef88a08c847986146de227d446a9 (diff)
downloadcraftbukkit-0f659850b2c5ae796db187cc78cecbd8f687462c.tar
craftbukkit-0f659850b2c5ae796db187cc78cecbd8f687462c.tar.gz
craftbukkit-0f659850b2c5ae796db187cc78cecbd8f687462c.tar.lz
craftbukkit-0f659850b2c5ae796db187cc78cecbd8f687462c.tar.xz
craftbukkit-0f659850b2c5ae796db187cc78cecbd8f687462c.zip
Made golems spawning respect spawn-animals for real. Fixes BUKKIT-1124
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/BlockPumpkin.java2
-rw-r--r--src/main/java/net/minecraft/server/World.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPumpkin.java b/src/main/java/net/minecraft/server/BlockPumpkin.java
index cb7824e5..a7c33bc9 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkin.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkin.java
@@ -41,7 +41,7 @@ public class BlockPumpkin extends BlockDirectional {
super.onPlace(world, i, j, k);
if (world.suppressPhysics) return; // CraftBukkit
if (world.getTypeId(i, j - 1, k) == Block.SNOW_BLOCK.id && world.getTypeId(i, j - 2, k) == Block.SNOW_BLOCK.id) {
- if (!world.isStatic && world.getServer().getServer().spawnAnimals) { // CraftBukkit - make snowmen obey spawning rules
+ if (!world.isStatic) {
// CraftBukkit start - Use BlockStateListPopulator
BlockStateListPopulator blockList = new BlockStateListPopulator(world.getWorld());
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;
}