Files
Purpur/patches/server/0070-Configurable-void-damage-height.patch
Ben Kerllenevich 3dce9755f3 Updated Upstream (Paper & Airplane) (#298)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
b8020379c Extract Adventure Version into a variable, add reminder to update the linked JD on the homepage (#5422)

Airplane Changes:
f5fb02447 Temporarily revert patch
3c728a7a9 Oops, these 2 too
37a93e561 Your daily dose of 1-3% optimization patches
bbd689a77 Remove useless check
2021-04-27 04:21:31 -07:00

38 lines
2.5 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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 08f286a085cf36ce9a0ea420389f4ea33fb1cc1a..0950dcce2353504775813d9f60407361981c801d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -750,7 +750,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
// 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 e10aa8ddbcea3588b2da08de929eed18cb9f022c..ef5a691861cdf249f0430fca7f7bbe241479926e 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -116,11 +116,13 @@ public class PurpurWorldConfig {
public boolean entitiesPickUpLootBypassMobGriefing = false;
public boolean milkCuresBadOmen = 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);
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
+ voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
}
public String playerDeathExpDropEquation = "expLevel * 7";