mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
six 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 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/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index ec00c2dd8f969eb99ec6a014e3bcd09c7484b237..9604bda9ed7e0a87bd627521440e8b70f076584a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.NeutralMob;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
+import net.minecraft.world.entity.ai.goal.FloatGoal;
|
||||
import net.minecraft.world.entity.ai.goal.GolemRandomStrollInVillageGoal;
|
||||
import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal;
|
||||
import net.minecraft.world.entity.ai.goal.MeleeAttackGoal;
|
||||
@@ -72,6 +73,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
|
||||
@Override
|
||||
protected void registerGoals() {
|
||||
+ if (level.purpurConfig.ironGolemCanSwim) this.goalSelector.addGoal(0, new FloatGoal(this)); // Purpur
|
||||
this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0D, true));
|
||||
this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9D, 32.0F));
|
||||
this.goalSelector.addGoal(2, new MoveBackToVillageGoal(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 f9908c4edd1b47b447556feeb5de05a0fd3db468..d7a0d258fb150a595fc8fcbf47cc9dbdb899421a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -154,6 +154,11 @@ public class PurpurWorldConfig {
|
||||
illusionerMaxHealth = getDouble("mobs.illusioner.attributes.max-health", illusionerMaxHealth);
|
||||
}
|
||||
|
||||
+ 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() {
|
||||
Reference in New Issue
Block a user