2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-04-13 22:00:18 +00: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-11-12 01:48:12 +00:00
|
|
|
index a5b04bd80be0e1d2c474c5d298e56a09a3ab5b9d..e37bad43c555531597eb9dae9879f5f8ee130847 100644
|
2019-04-13 22:00:18 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-11-12 01:48:12 +00:00
|
|
|
@@ -385,6 +385,11 @@ public class PaperWorldConfig {
|
2019-04-13 22:00:18 +00: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);
|
|
|
|
+ }
|
|
|
|
+
|
2020-08-25 02:22:08 +00:00
|
|
|
public boolean armorStandEntityLookups = true;
|
|
|
|
private void armorStandEntityLookups() {
|
|
|
|
armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true);
|
2019-04-13 22:00:18 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
2020-08-25 02:22:08 +00:00
|
|
|
index 09c88c1079d1169b76b19eea235d5ee7805c6b83..0a5c27e732540e03c87e6da0fbdc6e3c2e382810 100644
|
2019-04-13 22:00:18 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
2020-06-25 23:38:24 +00:00
|
|
|
@@ -251,7 +251,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
|
2019-04-13 22:00:18 +00: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) {
|