mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
43 lines
2.2 KiB
Diff
43 lines
2.2 KiB
Diff
From 66cfde050669201c4f05b1779f259e8cec8cf3c3 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 46e4574e55..5414d6975f 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 e2604d54bd..55c026d730 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -336,10 +336,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 llamaRidableInWater = false;
|
|
--
|
|
2.24.0
|
|
|