Files
Purpur/patches/server/0094-Configurable-void-damage-height.patch
William Blake Galbreath c0c212bf48 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads
3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495
e470f1ef Add more information to Timing Reports
f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers
a4fe910f Fix sounds when using worldedit regen command
70ad51a8 Updated Upstream (Bukkit/CraftBukkit)
d7cfa4fa Improve legacy format serialization more
2020-06-05 21:42:48 -05:00

47 lines
2.4 KiB
Diff

From 952255e563565af1c226c5d886251a2ff1fcc590 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 27 Feb 2020 21:42:19 -0600
Subject: [PATCH] Configurable void damage height
---
src/main/java/net/minecraft/server/Entity.java | 2 +-
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 69983550bb..86e244e068 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -504,7 +504,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
// Paper start
protected void performVoidDamage() {
- if (this.locY < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
+ if (this.locY < world.purpurConfig.voidDamageHeight || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
&& world.paperConfig.doNetherTopVoidDamage()
&& this.locY >= world.paperConfig.netherVoidTopDamageHeight)) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 4cb856ebbb..53c8782b59 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -189,6 +189,7 @@ public class PurpurWorldConfig {
public String playerSleepCondition = "time >= 12541 && time <= 23458";
public boolean useBetterMending = false;
public boolean saveProjectilesToDisk = true;
+ public double voidDamageHeight = -64.0D;
private void gameplayMechanicsSettings() {
boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight);
@@ -245,6 +246,7 @@ public class PurpurWorldConfig {
set("gameplay-mechanics.saveProjectilesToDisk", null);
}
saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
+ voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
}
public int elytraDamagePerSecond = 1;
--
2.24.0