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);
|
2021-03-16 08:19:45 +01:00
|
|
|
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 49495cfbcf9b7742583536b87fc7cbd7c7c4c867..5e2b49d120b724cb5a7ae00940ded4f4875ea8a1 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java
|
|
|
|
@@ -297,7 +297,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) {
|