mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
57dd397155
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
39 lines
1.8 KiB
Diff
39 lines
1.8 KiB
Diff
From fd386fcfe4a32bb728ea791ccb60da1a057a9a32 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
|
|
index 7d408542e7..c7cde1d0a0 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -415,6 +415,11 @@ public class PaperWorldConfig {
|
|
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
|
|
index 2f764776b2..7f6a567760 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
@@ -221,7 +221,7 @@ public class EntityIronGolem extends EntityGolem {
|
|
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) {
|
|
--
|
|
2.26.2
|
|
|