mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Make Iron Golems Swim
This commit is contained in:
@@ -83,6 +83,11 @@ mobs
|
|||||||
- **default**: true
|
- **default**: true
|
||||||
- **description**: Control if giant zombies have AI instead of just standing there
|
- **description**: Control if giant zombies have AI instead of just standing there
|
||||||
|
|
||||||
|
* iron_golem
|
||||||
|
* swims
|
||||||
|
- **default**: true
|
||||||
|
- **description**: Set whether iron golem can swim or not
|
||||||
|
|
||||||
* snow_golem
|
* snow_golem
|
||||||
* drops-pumpkin-when-sheared
|
* drops-pumpkin-when-sheared
|
||||||
- **default**: true
|
- **default**: true
|
||||||
|
|||||||
49
patches/server/0031-Make-Iron-Golems-Swim.patch
Normal file
49
patches/server/0031-Make-Iron-Golems-Swim.patch
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
From 1948126cc8b635dccfa7e02fddc8deb493e6272e 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 | 3 +++
|
||||||
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||||
|
2 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
index 41ad48c96..1290b3941 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
|
+import net.pl3x.purpur.PurpurConfig;
|
||||||
|
+
|
||||||
|
public class EntityIronGolem extends EntityGolem {
|
||||||
|
|
||||||
|
protected static final DataWatcherObject<Byte> b = DataWatcher.a(EntityIronGolem.class, DataWatcherRegistry.a);
|
||||||
|
@@ -14,6 +16,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initPathfinder() {
|
||||||
|
+ if (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 65a7b6e8b..74d238d82 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
|
@@ -127,6 +127,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
|
||||||
|
|
||||||
Reference in New Issue
Block a user