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 and damage


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 60d51a580672e8a943738c947e84353dbf2dba05..1d29ff3feaf95628dc84b67f430ddfc88b7bd507 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -793,7 +793,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
 
     public void checkOutOfWorld() {
         // Paper start - Configurable nether ceiling damage
-        if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
+        if (this.getY() < (double) (this.level.getMinBuildHeight() + level.purpurConfig.voidDamageHeight) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER // Purpur
             && level.paperConfig.doNetherTopVoidDamage()
             && this.getY() >= this.level.paperConfig.netherVoidTopDamageHeight)) {
             // Paper end
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6100efd3d5de767ecb257b2a1f4ccfb161e94522..c6cfc4f83ec5b67c62fbf82ef4b795c3c6b27282 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2402,7 +2402,7 @@ public abstract class LivingEntity extends Entity {
 
     @Override
     protected void outOfWorld() {
-        this.hurt(DamageSource.OUT_OF_WORLD, 4.0F);
+        this.hurt(DamageSource.OUT_OF_WORLD, (float) level.purpurConfig.voidDamageDealt); // Purpur
     }
 
     protected void updateSwingTime() {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 9c6554bb8633899466aab12a7cb9ea87dac95b73..313d977209b9cb972207cf2d4f63b5d4aadc7227 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -214,10 +214,14 @@ public class PurpurWorldConfig {
     public boolean disableDropsOnCrammingDeath = false;
     public boolean milkCuresBadOmen = true;
     public double tridentLoyaltyVoidReturnHeight = 0.0D;
+    public double voidDamageHeight = -64.0D;
+    public double voidDamageDealt = 4.0D;
     private void miscGameplayMechanicsSettings() {
         disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
         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);
+        voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt);
     }
 
     public boolean farmlandGetsMoistFromBelow = false;
