Separate ridable and controllable configs

This commit is contained in:
BillyGalbreath
2022-01-18 09:10:04 -06:00
parent 0a9a17044b
commit bd0a85a17c
94 changed files with 2558 additions and 1857 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 9a0a5da86e0502382cb538d6abea8e425e40dddc..93cc8dbf2ff435777a5edc11a834ca1b190638ab 100644
index 9e6b44da2098b11b204d45a0f44287d842b5f792..5bb5390ccec6826ead2198b413254dd1bd10f4b8 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
@@ -515,8 +515,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -520,8 +520,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
}
}
@@ -23,19 +23,19 @@ index 9a0a5da86e0502382cb538d6abea8e425e40dddc..93cc8dbf2ff435777a5edc11a834ca1b
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 e92a269a9340cd6b76cb7e13738ca46906675b2f..8ff90ee18ed8a6d6c5be991a5a0841383dd93f6c 100644
index f6d4be9b81b82e7ae46f7694b824a06b3f6272ed..2a226f91d7afe0489adb4dbe94d69e6fc8e6e4e4 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1539,6 +1539,8 @@ public class PurpurWorldConfig {
public boolean witherRidableInWater = false;
public double witherMaxY = 256D;
@@ -1662,6 +1662,8 @@ public class PurpurWorldConfig {
public boolean witherControllable = true;
public double witherMaxY = 320D;
public double witherMaxHealth = 300.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);
@@ -1553,6 +1555,8 @@ public class PurpurWorldConfig {
@@ -1677,6 +1679,8 @@ public class PurpurWorldConfig {
set("mobs.wither.attributes.max_health", oldValue);
}
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);