mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
d28dd3edbd
Brought our multiple TNT change patches into a single patch and configuraiton section. You /will/ need to update your configs, sorry. Adds additional configuration and features as well.
52 lines
2.0 KiB
Diff
52 lines
2.0 KiB
Diff
From 8037f86a24fd4ba5a90e088bc811bf4c810821a8 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Mon, 23 Feb 2015 14:57:28 -0600
|
|
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
|
|
index 4848e09..be59806 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -246,6 +246,13 @@ public abstract class Entity implements ICommandListener {
|
|
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) {
|
|
@@ -322,7 +329,7 @@ public abstract class Entity implements ICommandListener {
|
|
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
|
|
index bdf06fb..a756395 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -185,4 +185,10 @@ public class PaperSpigotWorldConfig
|
|
{
|
|
boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false );
|
|
}
|
|
+
|
|
+ public boolean netherVoidTopDamage;
|
|
+ private void nethervoidTopDamage()
|
|
+ {
|
|
+ netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.5.msysgit.0
|
|
|