Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-Server-Patches/0036-Configurable-top-of-nether-void-damage.patch
Zach Brown 233814297b Remove the spigot TileEntity/Entity capping feature
It appears to cause visual glitching issues with certain TNT entities
fired from cannons. TileEntity tick capping has already been removed
for some time, Entity tick capping removal is new to this patch.
2015-05-30 01:39:20 -05:00

52 Zeilen
2.0 KiB
Diff

From 656b4cb5ee5ec6dba6f69f3abfe48268565f0a0d 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 1470c21..79837ef 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -247,6 +247,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) {
@@ -323,7 +330,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 f33142a..a6d8532 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -186,4 +186,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 );
+ }
}
--
2.4.1.windows.1