mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@44ee1cd fix recipe packet limiter (#9841) PaperMC/Paper@e57af7d sync netty version with vanilla (#9842) Pufferfish Changes: pufferfish-gg/Pufferfish@0020a8b Port a patch from upstream pufferfish-gg/Pufferfish@979d3a2 Update upstream (last 1.20.1) pufferfish-gg/Pufferfish@06262c1 Initial 1.20.2 update
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Thu, 20 Aug 2020 17:38:12 -0700
|
||||
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 6f7ef64612d6229179545d56093efdf58a2d7978..b395d5c85f26ca4252d3f8f886b2ee5a7892af5f 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
|
||||
@@ -518,8 +518,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
}
|
||||
}
|
||||
|
||||
- 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
|
||||
+ // 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 3a4b67415d2e86d2d3d3709dd669c0d6ee56644a..2495cf8d28a2f11ddd1efefd6d772fccf1e488ba 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1717,6 +1717,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);
|
||||
@@ -1732,6 +1734,8 @@ public class PurpurWorldConfig {
|
||||
set("mobs.wither.attributes.max_health", oldValue);
|
||||
}
|
||||
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
|
||||
+ witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
|
||||
+ witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
|
||||
}
|
||||
|
||||
public boolean witherSkeletonRidable = false;
|
||||
Reference in New Issue
Block a user