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

Paper Changes:
a6ac47e5 Fix numerous item duplication issues and teleport issues
b7402f11 Add phantom creative and insomniac controls (#3222)
75819fac Fix Potion#toItemStack swapping the extended and upgraded constructor values (#3216)
2020-04-25 15:48:09 -05:00

43 lines
2.2 KiB
Diff

From 45691659f26a3ab5b01aad9dd042a01f425313c0 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 288a043fb..0cc3b8eb0 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 f098a36b5..a07781929 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