mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
PaperPR - Projectile load/save limit per chunk
- Dropped "Add option to disable saving projectiles to disk" in favor of the above patch - Config migration is automatic. If "gameplay-mechanics.save-projectiles-to-disk" was set to false in purpur.yml, "projectile-load-save-per-chunk-limit" will be set to 0 in paper.yml (resulting in unchanged behaviour)
This commit is contained in:
43
patches/server/0089-Customizable-EnderDragon-Health.patch
Normal file
43
patches/server/0089-Customizable-EnderDragon-Health.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
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 a5a2182455..d2fcd0bc16 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -62,6 +62,16 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
this.bG = new DragonControllerManager(this);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public void initAttributes(World world) {
|
||||
+ if (world != null) {
|
||||
+ this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(world.purpurConfig.enderDragonMaxHealth);
|
||||
+ setHealth(getMaxHealth());
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public static AttributeProvider.Builder m() {
|
||||
return EntityInsentient.p().a(GenericAttributes.MAX_HEALTH, 200.0D);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 24821f09d4..975e25a454 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -277,9 +277,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;
|
||||
Reference in New Issue
Block a user