2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-04-14 00:00:18 +02:00
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
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
|
2020-06-28 10:35:41 +02:00
|
|
|
index 796c5a0b110009b479f5c9eef17e2605b564ce09..1b2256144f7f968667570e5a9838a77173d515c5 100644
|
2019-04-14 00:00:18 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-06-28 10:35:41 +02:00
|
|
|
@@ -380,6 +380,11 @@ public class PaperWorldConfig {
|
2019-04-14 00:00:18 +02:00
|
|
|
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 int bedSearchRadius = 1;
|
|
|
|
private void bedSearchRadius() {
|
|
|
|
bedSearchRadius = getInt("bed-search-radius", 1);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
2020-06-26 01:38:24 +02:00
|
|
|
index 86de45327653c09dcb6764754b10b8ad1b3450fd..e38a675be7e6a4cbb1f2f7606bf84ac570bb5985 100644
|
2019-04-14 00:00:18 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
2020-06-26 01:38:24 +02:00
|
|
|
@@ -251,7 +251,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
|
2019-04-14 00:00:18 +02:00
|
|
|
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) {
|