save stuff here

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:01:03 -04:00
parent 0b3c94c72d
commit 8768f54932
159 changed files with 4276 additions and 3663 deletions

View File

@@ -6,7 +6,7 @@ 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 0ecbee51a48171cad95cc80bd26644774064fead..52f6459b0bfff7991da6cb0deda1b15664c4d00b 100644
index 45c050f2b9cebfa629c908cb3b91a909489b8ec1..b39a7dfb910e99f04275fa8e246581f5ccc27afa 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
@@ -529,8 +529,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -16,26 +16,26 @@ index 0ecbee51a48171cad95cc80bd26644774064fead..52f6459b0bfff7991da6cb0deda1b156
- if (this.tickCount % 20 == 0) {
- this.heal(1.0F, EntityRegainHealthEvent.RegainReason.REGEN); // CraftBukkit
+ // Purpur start - customizable heal rate and amount
+ if (this.tickCount % level.purpurConfig.witherHealthRegenDelay == 0) {
+ this.heal(level.purpurConfig.witherHealthRegenAmount, EntityRegainHealthEvent.RegainReason.REGEN); // CraftBukkit
+ if (this.tickCount % level().purpurConfig.witherHealthRegenDelay == 0) {
+ this.heal(level().purpurConfig.witherHealthRegenAmount, EntityRegainHealthEvent.RegainReason.REGEN); // CraftBukkit
+ // Purpur end
}
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 7a4658b2eb4fb785809783dbf30c5abecd32c6d8..0c0c2745a18593ee7da491d0f1b5c0d11aa1a3c4 100644
index 558562f574a31e748710e68a67baa1292d794b30..09b253836220f0e6de3b0c804ffb34bd6480c809 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1273,6 +1273,8 @@ public class PurpurWorldConfig {
}
@@ -1713,6 +1713,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() {
if (PurpurConfig.version < 8) {
double oldValue = getDouble("mobs.wither.max-health", witherMaxHealth);
@@ -1284,6 +1286,8 @@ public class PurpurWorldConfig {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1728,6 +1730,8 @@ public class PurpurWorldConfig {
set("mobs.wither.attributes.max_health", oldValue);
}
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
@@ -43,4 +43,4 @@ index 7a4658b2eb4fb785809783dbf30c5abecd32c6d8..0c0c2745a18593ee7da491d0f1b5c0d1
+ witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
}
public double witherSkeletonMaxHealth = 20.0D;
public boolean witherSkeletonRidable = false;