mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Merge in Tuinity patches
This commit is contained in:
42
patches/server/0030-Make-Iron-Golems-Swim.patch
Normal file
42
patches/server/0030-Make-Iron-Golems-Swim.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 389fb5986fcd93d1b4ffca65e00d40379d6a7402 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 46e4574e5..5414d6975 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 e2604d54b..55c026d73 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
|
||||
|
||||
Reference in New Issue
Block a user