mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
42 lines
1.9 KiB
Diff
42 lines
1.9 KiB
Diff
From 4aedd5650bafc65683e95343338459516781dc43 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/PurpurConfig.java | 5 +++++
|
|
2 files changed, 6 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
index 41ad48c963..632d16cafd 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
|
@@ -14,6 +14,7 @@ public class EntityIronGolem extends EntityGolem {
|
|
|
|
@Override
|
|
protected void initPathfinder() {
|
|
+ if (net.pl3x.purpur.PurpurConfig.ironGolemSwims) 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));
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index e7ce46002a..c808ed50ef 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -135,6 +135,11 @@ public class PurpurConfig {
|
|
giantsHaveAI = getBoolean("settings.mobs.giant.have-ai", giantsHaveAI);
|
|
}
|
|
|
|
+ public static boolean ironGolemSwims = true;
|
|
+ private static void ironGolemSettings() {
|
|
+ ironGolemSwims = getBoolean("settings.mobs.iron_golem.swims", ironGolemSwims);
|
|
+ }
|
|
+
|
|
public static boolean snowmanDropsPumpkin = true;
|
|
public static boolean snowmanPumpkinPutBack = true;
|
|
private static void snowmansSettings() {
|
|
--
|
|
2.20.1
|
|
|