more progress

This commit is contained in:
BillyGalbreath
2021-06-19 15:58:07 -05:00
parent f3e366449c
commit 526a0beb38
78 changed files with 628 additions and 674 deletions

View File

@@ -6,22 +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 96631591db018545120ba1c9980a03eb596eb6e5..b447c1c4d7d3133e953d8f70e6720ddfba4f7553 100644
index 96631591db018545120ba1c9980a03eb596eb6e5..9c45c0e232da2597f071081443f9db3df57b5513 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
@@ -197,6 +197,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
level.addFreshEntity(skull);
}
+ @Override
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.witherMaxHealth);
+ }
+
@Override
public void initAttributes() {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level.purpurConfig.witherMaxHealth);
@@ -499,8 +504,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -499,8 +499,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
}
}
@@ -35,10 +23,10 @@ index 96631591db018545120ba1c9980a03eb596eb6e5..b447c1c4d7d3133e953d8f70e6720ddf
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 02a249afc39239327c1bd99f40d73d6cc616644a..a956362ed2b724a50c8f7023799bd3314b287020 100644
index 842bc3d16f13d1a3daf663b2bdfb0135832c95da..8d70915300f563affb7d8ab631699c484fb9c8f8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1517,6 +1517,8 @@ public class PurpurWorldConfig {
@@ -1505,6 +1505,8 @@ public class PurpurWorldConfig {
public boolean witherRidableInWater = false;
public double witherMaxY = 256D;
public double witherMaxHealth = 300.0D;
@@ -47,7 +35,7 @@ index 02a249afc39239327c1bd99f40d73d6cc616644a..a956362ed2b724a50c8f7023799bd331
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1531,6 +1533,8 @@ public class PurpurWorldConfig {
@@ -1519,6 +1521,8 @@ public class PurpurWorldConfig {
set("mobs.wither.attributes.max_health", oldValue);
}
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);