aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0322-Add-option-to-allow-iron-golems-to-spawn-in-air.patch
blob: 75d1d9c02bdcb62cfb38e0b613bc7aebecefd499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
index 615be0b85fb3d28a044c6bae6a0fe93ec4fca061..1807da10d07d1f6e4ddbc0fa1b8da34a688d67c3 100644
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
@@ -325,7 +325,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
         BlockPos blockposition1 = blockposition.below();
         BlockState iblockdata = world.getBlockState(blockposition1);
 
-        if (!iblockdata.entityCanStandOn(world, blockposition1, this)) {
+        if (!iblockdata.entityCanStandOn(world, blockposition1, this) && !this.level().paperConfig().entities.spawning.ironGolemsCanSpawnInAir) { // Paper - Add option to allow iron golems to spawn in air
             return false;
         } else {
             for (int i = 1; i < 3; ++i) {