mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Withers are created with 1/3 health :3
This commit is contained in:
@@ -6,10 +6,10 @@ Subject: [PATCH] Customizable WitherBoss Health and Healing
|
|||||||
Adds the ability to customize the health of the Wither Boss, as well as the amount that it heals, and how often in the PurpurWorldConfig.
|
Adds the ability to customize the health of the Wither Boss, as well as the amount that it heals, and how often in the PurpurWorldConfig.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
index 1511212cbf..bbcd509d4b 100644
|
index 1511212cbf..e8f81cd109 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
@@ -41,6 +41,16 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -41,6 +41,15 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
this.f = 50;
|
this.f = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,7 +18,6 @@ index 1511212cbf..bbcd509d4b 100644
|
|||||||
+ public void initAttributes(World world) {
|
+ public void initAttributes(World world) {
|
||||||
+ if (world != null) {
|
+ if (world != null) {
|
||||||
+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.witherMaxHealth);
|
+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.witherMaxHealth);
|
||||||
+ setHealth(getMaxHealth());
|
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
@@ -26,7 +25,7 @@ index 1511212cbf..bbcd509d4b 100644
|
|||||||
@Override
|
@Override
|
||||||
protected void initPathfinder() {
|
protected void initPathfinder() {
|
||||||
this.goalSelector.a(0, new EntityWither.a());
|
this.goalSelector.a(0, new EntityWither.a());
|
||||||
@@ -230,7 +240,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -230,7 +239,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
|
|
||||||
this.setInvul(i);
|
this.setInvul(i);
|
||||||
if (this.ticksLived % 10 == 0) {
|
if (this.ticksLived % 10 == 0) {
|
||||||
@@ -35,7 +34,7 @@ index 1511212cbf..bbcd509d4b 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -339,9 +349,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -339,9 +348,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +48,7 @@ index 1511212cbf..bbcd509d4b 100644
|
|||||||
|
|
||||||
this.bossBattle.setProgress(this.getHealth() / this.getMaxHealth());
|
this.bossBattle.setProgress(this.getHealth() / this.getMaxHealth());
|
||||||
}
|
}
|
||||||
@@ -354,6 +366,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -354,6 +365,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
public void beginSpawnSequence() {
|
public void beginSpawnSequence() {
|
||||||
this.setInvul(220);
|
this.setInvul(220);
|
||||||
this.setHealth(this.getMaxHealth() / 3.0F);
|
this.setHealth(this.getMaxHealth() / 3.0F);
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-99259 - Show wither health bar even during
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
index 81b3b9fbc5..48ae065700 100644
|
index e8f81cd109..8a0c623214 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
@@ -355,8 +355,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -354,8 +354,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Purpur end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user