Files
Purpur/patches/server/0029-Make-Iron-Golems-Swim.patch
William Blake Galbreath c0c212bf48 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads
3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495
e470f1ef Add more information to Timing Reports
f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers
a4fe910f Fix sounds when using worldedit regen command
70ad51a8 Updated Upstream (Bukkit/CraftBukkit)
d7cfa4fa Improve legacy format serialization more
2020-06-05 21:42:48 -05:00

43 lines
2.2 KiB
Diff

From 7091b58fda2ba308981493e7d38cb0d28e34b871 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 15 Jun 2019 03:12:15 -0500
Subject: [PATCH] Make Iron Golems Swim
---
src/main/java/net/minecraft/server/EntityIronGolem.java | 1 +
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
index 288a043fbd..0cc3b8eb01 100644
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -36,6 +36,7 @@ public class EntityIronGolem extends EntityGolem {
@Override
protected void initPathfinder() {
+ if (world.purpurConfig.ironGolemCanSwim) this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur
this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true));
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index f098a36b51..a077819292 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -333,10 +333,12 @@ public class PurpurWorldConfig {
public boolean ironGolemRidable = false;
public boolean ironGolemRidableInWater = false;
public boolean ironGolemRequireShiftToMount = true;
+ public boolean ironGolemCanSwim = false;
private void ironGolemSettings() {
ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable);
ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater);
ironGolemRequireShiftToMount = getBoolean("mobs.iron_golem.require-shift-to-mount", ironGolemRequireShiftToMount);
+ ironGolemCanSwim = getBoolean("mobs.iron_golem.can-swim", ironGolemCanSwim);
}
public boolean llamaRidable = false;
--
2.24.0