mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Add water damage to all mobs (#703)
Co-authored-by: SPh <sph@sphnet.in>
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Iron golem poppy calms anger
|
||||
|
||||
|
||||
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 f4e983da7206923ee0b0f984e65a6c2b3a6a8aeb..cea3725009af1bc746a593c4db63ed630889cd21 100644
|
||||
index e327e00506f1b96fe924e52de6c45034ba56ac7a..e19e0c934c2e494a439ba8ec22b238e82aa72c28 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -91,6 +91,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
@@ -96,6 +96,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
protected void registerGoals() {
|
||||
if (level.purpurConfig.ironGolemCanSwim) this.goalSelector.addGoal(0, new net.minecraft.world.entity.ai.goal.FloatGoal(this)); // Purpur
|
||||
this.goalSelector.addGoal(0, new net.pl3x.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
@@ -17,21 +17,21 @@ index f4e983da7206923ee0b0f984e65a6c2b3a6a8aeb..cea3725009af1bc746a593c4db63ed63
|
||||
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 7900d817229a63e5c8e2bd2a0ebedd4ead3ce7d4..d36ee86f7f03dd1543d65e12f7fb1872276ebe16 100644
|
||||
index 0a103138f31473fdadff6c342f8b9aa22dad81fe..330dd72da29356d299ba74075819c80633c18187 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1289,6 +1289,7 @@ public class PurpurWorldConfig {
|
||||
public boolean ironGolemRidableInWater = false;
|
||||
@@ -1342,6 +1342,7 @@ public class PurpurWorldConfig {
|
||||
public boolean ironGolemCanSwim = false;
|
||||
public double ironGolemMaxHealth = 100.0D;
|
||||
public boolean ironGolemTakeDamageFromWater = false;
|
||||
+ public boolean ironGolemPoppyCalm = false;
|
||||
private void ironGolemSettings() {
|
||||
ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable);
|
||||
ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater);
|
||||
@@ -1299,6 +1300,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.iron_golem.attributes.max_health", oldValue);
|
||||
@@ -1353,6 +1354,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
ironGolemMaxHealth = getDouble("mobs.iron_golem.attributes.max_health", ironGolemMaxHealth);
|
||||
ironGolemTakeDamageFromWater = getBoolean("mobs.iron_golem.takes-damage-from-water", ironGolemTakeDamageFromWater);
|
||||
+ ironGolemPoppyCalm = getBoolean("mobs.iron_golem.poppy-calms-anger", ironGolemPoppyCalm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user