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
|
2021-01-11 02:44:06 +01:00
|
|
|
index 9e4591ddc4b755f4ff5a6f1078b51cb13db80480..fe1c9dd8258ec8c3fdf343d4a44de2be2ae3d35f 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
|
2021-01-11 02:44:06 +01:00
|
|
|
@@ -387,6 +387,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);
|
|
|
|
+ }
|
|
|
|
+
|
2020-08-25 04:22:08 +02:00
|
|
|
public boolean armorStandEntityLookups = true;
|
|
|
|
private void armorStandEntityLookups() {
|
|
|
|
armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true);
|
2019-04-14 00:00:18 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
2020-08-25 04:22:08 +02:00
|
|
|
index 09c88c1079d1169b76b19eea235d5ee7805c6b83..0a5c27e732540e03c87e6da0fbdc6e3c2e382810 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) {
|