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

Paper Changes:
826e09f3 Light improvements
e3e1191a Preserve initial velocity of spawned entities - Fixes #4292
bd648dfb Optimize some methods for inlining
9efe0710 Only consider chunks Loaded if at BORDER status
298c9022 Updated Upstream (Bukkit/CraftBukkit/Spigot)
d9467169 [Auto] Updated Upstream (CraftBukkit)
d802a50a Extend block drop capture to capture all items added to the world (Fixes #4307)
2020-09-20 09:57:51 -05:00

39 lines
2.4 KiB
Diff

From 0000000000000000000000000000000000000000 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
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bb9ceadc5..872fc34d9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -611,7 +611,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 // Purpur
&& world.paperConfig.doNetherTopVoidDamage()
&& this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) {
this.doVoidDamage();
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 839fead62..4466f21ba 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -115,12 +115,14 @@ public class PurpurWorldConfig {
public boolean milkCuresBadOmen = true;
public boolean saveProjectilesToDisk = true;
public double tridentLoyaltyVoidReturnHeight = 0.0D;
+ public double voidDamageHeight = -64.0D;
private void miscGameplayMechanicsSettings() {
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
+ voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
}
public String playerDeathExpDropEquation = "expLevel * 7";