2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
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
|
2022-06-06 02:17:27 +02:00
|
|
|
index 62dfb6afe204c078f579a3dae944d9350aaf72d0..82d8299d949ee26eefba2952b625650c1aca0e6a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2022-06-06 02:17:27 +02:00
|
|
|
@@ -444,6 +444,11 @@ public class PaperWorldConfig {
|
2021-06-11 14:02:28 +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 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
|
2022-06-08 06:06:41 +02:00
|
|
|
index d2864615588aadf81ac9763ba402ede0c1eebb23..0a239df9a43669047be3d6006597128860862060 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
2022-06-08 06:06:41 +02:00
|
|
|
@@ -334,7 +334,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
2021-06-11 14:02:28 +02:00
|
|
|
BlockPos blockposition1 = blockposition.below();
|
|
|
|
BlockState iblockdata = world.getBlockState(blockposition1);
|
|
|
|
|
2021-11-24 10:01:27 +01:00
|
|
|
- if (!iblockdata.entityCanStandOn(world, blockposition1, this)) {
|
|
|
|
+ if (!iblockdata.entityCanStandOn(world, blockposition1, this) && !level.paperConfig.ironGolemsCanSpawnInAir) { // Paper
|
2021-06-11 14:02:28 +02:00
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
for (int i = 1; i < 3; ++i) {
|