mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 1daafe455 Updated Upstream (Bukkit/CraftBukkit) 98828b006 Merge pull request #4132 from Proximyst/progress/1.16.2 b23f27f8d Fix incorrect return for WorldServer#addAllEntitiesSafely (#3) 5085fa30c Fix MC-187716 Use configured height c44add5a0 Initialise a new chunk section if none was found yet updated 74a4d5f8b Remove armour stand double add to world 6d25cc4ec Don't mark null chunk sections for block updates
39 lines
2.4 KiB
Diff
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 e208190073..305b63b295 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -612,7 +612,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 6ac7862063..a071129db0 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";
|