diff options
Diffstat (limited to 'patches/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch')
-rw-r--r-- | patches/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch new file mode 100644 index 0000000000..9af21c4957 --- /dev/null +++ b/patches/server/0372-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath <[email protected]> +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 bcc6dd9f175431e47b92f6ee85b6f86d09011ac6..8ff3719184484399ba1760b0f5e43e3ca961a028 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -418,6 +418,11 @@ 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/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +index 3e4241d83ec26e575dcdbd0f7fb6b1edbf0b2d05..8299b48bad7a38d4310ca93b1de37d6c9170fc09 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java ++++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +@@ -323,7 +323,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { + BlockPos blockposition1 = blockposition.below(); + BlockState iblockdata = world.getBlockState(blockposition1); + +- if (!iblockdata.entityCanStandOn(world, blockposition1, this)) { ++ if (!iblockdata.entityCanStandOn(world, blockposition1, this) && !level.paperConfig.ironGolemsCanSpawnInAir) { // Paper + return false; + } else { + for (int i = 1; i < 3; ++i) { |