2016-05-17 04:07:12 +02:00
|
|
|
From 5897b5a231713af5b38a3da0e2eb7a400da94d6f Mon Sep 17 00:00:00 2001
|
2016-03-01 00:09:49 +01: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-05-17 04:07:12 +02:00
|
|
|
index 8fc2f6c..d78b688 100644
|
2016-03-01 00:09:49 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-17 04:07:12 +02:00
|
|
|
@@ -152,4 +152,10 @@ public class PaperWorldConfig {
|
2016-03-01 00:09:49 +01: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-05-12 04:07:46 +02:00
|
|
|
index 2455b9c..751e07d 100644
|
2016-03-01 00:09:49 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2016-05-12 04:07:46 +02:00
|
|
|
@@ -303,6 +303,13 @@ public abstract class Entity implements ICommandListener {
|
2016-03-01 00:09:49 +01: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");
|
2016-05-12 04:07:46 +02:00
|
|
|
if (this.isPassenger() && this.bz().dead) {
|
|
|
|
@@ -383,7 +390,7 @@ public abstract class Entity implements ICommandListener {
|
2016-03-01 00:09:49 +01: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-05-12 04:07:46 +02:00
|
|
|
2.8.2
|
2016-03-01 00:09:49 +01:00
|
|
|
|