mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Add option to allow iron golems to spawn in air
This commit is contained in:
@@ -178,7 +178,10 @@ mobs
|
|||||||
* iron_golem
|
* iron_golem
|
||||||
* swims
|
* swims
|
||||||
- **default**: true
|
- **default**: true
|
||||||
- **description**: Set whether iron golem can swim or not
|
- **description**: Set whether iron golems can swim or not
|
||||||
|
* can-spawn-in-air
|
||||||
|
- **default**: false
|
||||||
|
- **description**: Set whether iron golems can spawn in the air, like in 1.12 and below
|
||||||
|
|
||||||
* phantom
|
* phantom
|
||||||
* crystals-attack-range
|
* crystals-attack-range
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
From 460df69e28a020627023231fc8f3f38789effe79 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Sat, 19 Oct 2019 02:20:45 -0500
|
||||||
|
Subject: [PATCH] Add option to allow iron golems to spawn in air
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/net/minecraft/server/EntityIronGolem.java | 2 +-
|
||||||
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 2 ++
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
index 9bb033336c..6fdc4e6d6a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
@@ -169,7 +169,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) && !net.pl3x.purpur.PurpurConfig.ironGolemsCanSpawnInAir) { // Purpur
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
for (int i = 1; i < 3; ++i) {
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
index a8d86b4345..a98e704cff 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
@@ -241,8 +241,10 @@ public class PurpurConfig {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean ironGolemSwims = true;
|
||||||
|
+ public static boolean ironGolemsCanSpawnInAir = false;
|
||||||
|
private static void ironGolemSettings() {
|
||||||
|
ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
||||||
|
+ ironGolemsCanSpawnInAir = getBoolean("settings.mobs.iron_golem.can-spawn-in-air", ironGolemsCanSpawnInAir);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||||
|
--
|
||||||
|
2.23.0.rc1
|
||||||
|
|
||||||
Reference in New Issue
Block a user