2016-03-29 01:01:42 +00:00
|
|
|
From 03c404597d6f991e3d0efe86410ba1ae26622b18 Mon Sep 17 00:00:00 2001
|
2016-02-29 23:09:49 +00:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Tue, 1 Mar 2016 23:58:50 -0600
|
|
|
|
Subject: [PATCH] Configurable top of nether void damage
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-19 02:10:20 +00:00
|
|
|
index f81ece3..7c0e61f 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-19 02:10:20 +00:00
|
|
|
@@ -149,4 +149,10 @@ public class PaperWorldConfig {
|
2016-02-29 23:09:49 +00:00
|
|
|
waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5);
|
|
|
|
log("Water over lava flow speed: " + waterOverLavaFlowSpeed);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean netherVoidTopDamage;
|
|
|
|
+ private void netherVoidTopDamage() {
|
|
|
|
+ netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
|
|
|
|
+ log("Top of the nether void damage: " + netherVoidTopDamage);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2016-03-29 01:01:42 +00:00
|
|
|
index 7152182..96014a9 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2016-03-25 09:02:35 +00:00
|
|
|
@@ -301,6 +301,13 @@ public abstract class Entity implements ICommandListener {
|
2016-02-29 23:09:49 +00:00
|
|
|
this.U();
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Paper - Checks if the feature is enabled and the entity is above the nether world bedrock height
|
|
|
|
+ */
|
|
|
|
+ private boolean paperNetherCheck() {
|
|
|
|
+ return this.world.paperConfig.netherVoidTopDamage && this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this.locY >= 128.0D;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public void U() {
|
|
|
|
this.world.methodProfiler.a("entityBaseTick");
|
|
|
|
if (this.isPassenger() && this.by().dead) {
|
2016-03-25 09:02:35 +00:00
|
|
|
@@ -381,7 +388,7 @@ public abstract class Entity implements ICommandListener {
|
2016-02-29 23:09:49 +00:00
|
|
|
this.fallDistance *= 0.5F;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (this.locY < -64.0D) {
|
|
|
|
+ if (this.locY < -64.0D || paperNetherCheck()) { // Paper - Configurable top-of-nether void damage)
|
|
|
|
this.Y();
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-03-29 01:01:42 +00:00
|
|
|
2.7.4
|
2016-02-29 23:09:49 +00:00
|
|
|
|