Files
Purpur/patches/server/0035-Make-Iron-Golems-Swim.patch
jmp 7ed791400e Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
cc001a73b Climbing should not bypass cramming gamerule
b9930b39d Add legacy plugin count to metrics
4729e6b90 Add more lightning API
5e220bcb5 [ci skip] add stale bot configuration
2a44498a5 Add PlayerItemCooldownEvent
fd33bcee1 Add LivingEntity#clearActiveItem
a99e0ca05 Fix Player spawnParticle x/y/z precision loss
2020-12-02 14:35:13 -08:00

35 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 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
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
index 0a5c27e732..bdff236883 100644
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -24,6 +24,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
@Override
protected void initPathfinder() {
+ if (world.purpurConfig.ironGolemCanSwim) this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true));
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
this.goalSelector.a(2, new PathfinderGoalStrollVillage(this, 0.6D, false));
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index fe82dc392b..fd552adb95 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -144,6 +144,11 @@ public class PurpurWorldConfig {
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
}
+ public boolean ironGolemCanSwim = false;
+ private void ironGolemSettings() {
+ ironGolemCanSwim = getBoolean("mobs.iron_golem.can-swim", ironGolemCanSwim);
+ }
+
public double rabbitNaturalToast = 0.0D;
public double rabbitNaturalKiller = 0.0D;
private void rabbitSettings() {