From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sat, 13 Apr 2019 16:50:58 -0500 Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true); } + public boolean ironGolemsCanSpawnInAir = false; + private void ironGolemsCanSpawnInAir() { + ironGolemsCanSpawnInAir = getBoolean("iron-golems-can-spawn-in-air", ironGolemsCanSpawnInAir); + } + public boolean armorStandEntityLookups = true; private void armorStandEntityLookups() { armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java @@ -0,0 +0,0 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable { BlockPosition blockposition1 = blockposition.down(); IBlockData iblockdata = iworldreader.getType(blockposition1); - if (!iblockdata.a((IBlockAccess) iworldreader, blockposition1, (Entity) this)) { + if (!iblockdata.a((IBlockAccess) iworldreader, blockposition1, (Entity) this) && !world.paperConfig.ironGolemsCanSpawnInAir) { // Paper return false; } else { for (int i = 1; i < 3; ++i) {