2015-09-13 02:57:39 +02:00
|
|
|
From a1f9b6079003b39860e02302b66dee4ac3499c8b Mon Sep 17 00:00:00 2001
|
2015-01-29 22:34:32 +01:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2015-02-23 22:03:10 +01:00
|
|
|
Date: Mon, 23 Feb 2015 14:57:28 -0600
|
2015-01-29 22:34:32 +01:00
|
|
|
Subject: [PATCH] Configurable top of nether void damage
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2015-09-02 03:14:41 +02:00
|
|
|
index 3e89aa9..a3b4cdb 100644
|
2015-01-29 22:34:32 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2015-09-02 03:14:41 +02:00
|
|
|
@@ -248,6 +248,13 @@ public abstract class Entity implements ICommandListener {
|
2015-01-29 22:34:32 +01:00
|
|
|
this.K();
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * PaperSpigot - Checks if the feature is enabled and the entity is above the nether world bedrock height
|
|
|
|
+ */
|
|
|
|
+ private boolean paperNetherCheck() {
|
|
|
|
+ return this.world.paperSpigotConfig.netherVoidTopDamage && this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this.locY >= 128.0D;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public void K() {
|
|
|
|
this.world.methodProfiler.a("entityBaseTick");
|
|
|
|
if (this.vehicle != null && this.vehicle.dead) {
|
2015-09-02 03:14:41 +02:00
|
|
|
@@ -324,7 +331,7 @@ public abstract class Entity implements ICommandListener {
|
2015-01-29 22:34:32 +01:00
|
|
|
this.fallDistance *= 0.5F;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (this.locY < -64.0D) {
|
|
|
|
+ if (this.locY < -64.0D || paperNetherCheck()) { // PaperSpigot - Configurable top-of-nether void damage
|
|
|
|
this.O();
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-09-02 03:14:41 +02:00
|
|
|
index 88ee38a..c1f21ae 100644
|
2015-01-29 22:34:32 +01:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-06-04 12:57:23 +02:00
|
|
|
@@ -228,4 +228,10 @@ public class PaperSpigotWorldConfig
|
2015-01-29 22:34:32 +01:00
|
|
|
{
|
2015-02-23 22:03:10 +01:00
|
|
|
boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
2015-01-29 22:34:32 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean netherVoidTopDamage;
|
|
|
|
+ private void nethervoidTopDamage()
|
|
|
|
+ {
|
|
|
|
+ netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-09-02 03:14:41 +02:00
|
|
|
2.5.1
|
2015-01-29 22:34:32 +01:00
|
|
|
|