mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 97f920bf Fix suggest-player-names-when-null-tab-completions - Fixes #3803 166e52b5 [CI-SKIP] [Auto] Rebuild Patches 5a17ba07 Implements #3761 - Add entity liquid API (#3762) e0cae289 Fix anvils bug - Fixes #3802 4793f774 Move bedrock config under unsupported, add comments to these configs adf1de58 Allow delegation to vanilla chunk gen 40ace3f7 Allow delegation to vanilla chunk gen 178a6e50 Add PrepareResultEvent (#3776) 57697cd5 Report proxy onlinde mode to bstats as online (#3093) 6579ce05 Fix #3701 - Loottables erasing on viewing 030da7b8 [CI-SKIP] [Auto] Rebuild Patches d43def79 Incorrect spawn reason for monsters from spawner - Fixes #3708 (#3764) 97b59df9 [Auto] Updated Upstream (CraftBukkit) 0543f051 [CI-SKIP] [Auto] Rebuild Patches f3cd94c4 Remove streams from classes related to villager gossip (#3748) b49104db add EntityTargetLivingEntityEvent for new 1.16 mobs (#3782) 4faf9703 Fix /plugins list not alphabetical to players (#3790) 7e03e44e [CI-SKIP] [Auto] Rebuild Patches 8bb00272 Update itemstack legacy name and lore (#3741) 6c87b6a0 [Auto] Updated Upstream (CraftBukkit)
44 lines
2.0 KiB
Diff
44 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Bierque <bierquejason@gmail.com>
|
|
Date: Wed, 1 Jul 2020 22:36:06 +0200
|
|
Subject: [PATCH] Customizable EnderDragon Health
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
index 08fa5a9756..e08e6014f8 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
@@ -66,6 +66,16 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
|
return EntityInsentient.p().a(GenericAttributes.MAX_HEALTH, 200.0D);
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ @Override
|
|
+ public void initAttributes(World world) {
|
|
+ if (world != null) {
|
|
+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.enderDragonMaxHealth);
|
|
+ setHealth(getMaxHealth());
|
|
+ }
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
@Override
|
|
protected void initDatawatcher() {
|
|
super.initDatawatcher();
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index f2ca515c9b..e6b41ab924 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -269,9 +269,11 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean enderDragonAlwaysDropsEggBlock = false;
|
|
public boolean enderDragonAlwaysDropsFullExp = false;
|
|
+ public double enderDragonMaxHealth = 200.0D;
|
|
private void enderDragonSettings() {
|
|
enderDragonAlwaysDropsEggBlock = getBoolean("mobs.ender_dragon.always-drop-egg-block", enderDragonAlwaysDropsEggBlock);
|
|
enderDragonAlwaysDropsFullExp = getBoolean("mobs.ender_dragon.always-drop-full-exp", enderDragonAlwaysDropsFullExp);
|
|
+ enderDragonMaxHealth = getDouble("mobs.ender_dragon.max-health", enderDragonMaxHealth);
|
|
}
|
|
|
|
public boolean endermanAllowGriefing = true;
|