configurable mob size attribute (#1538)

This commit is contained in:
granny
2024-06-21 04:11:09 -07:00
committed by GitHub
parent c0f5e78dc2
commit b82f6939fe
234 changed files with 2140 additions and 1855 deletions

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Customizable wither health and healing
Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often.
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 4b1821ad50103cb996bb3ff9b9668f22ffff518f..402f67ca333e09c684ae083071715734e0767bf5 100644
index 0e2e7f935deb674bfcbdf4f1ba7de7834ed1c61a..e3ee5d5eb80d689eb77731b3f26d0c314fcc4436 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -521,8 +521,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -522,8 +522,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
}
}
@@ -23,22 +23,22 @@ index 4b1821ad50103cb996bb3ff9b9668f22ffff518f..402f67ca333e09c684ae083071715734
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 1f56afb08d0f1460b3eaca33cc7dedb2707a5aea..5ddeb816c1bc7ee07a131be2e4e99b58e4d06db1 100644
index b3a9e307d1bed0c53a42119fa74c3a0f1be12d36..36b2b377f3253e5013c307b82c6ed893d5b58ffd 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1739,6 +1739,8 @@ public class PurpurWorldConfig {
public boolean witherControllable = true;
@@ -1861,6 +1861,8 @@ public class PurpurWorldConfig {
public double witherMaxY = 320D;
public double witherMaxHealth = 300.0D;
public double witherScale = 1.0D;
+ public float witherHealthRegenAmount = 1.0f;
+ public int witherHealthRegenDelay = 20;
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1754,6 +1756,8 @@ public class PurpurWorldConfig {
set("mobs.wither.attributes.max_health", oldValue);
@@ -1877,6 +1879,8 @@ public class PurpurWorldConfig {
}
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
witherScale = Mth.clamp(getDouble("mobs.wither.attributes.scale", witherScale), 0.0625D, 16.0D);
+ witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
+ witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
}