73983e4c16
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3dc4cdcd Update to Minecraft 1.14.3-pre4 88b25a8c SPIGOT-5098: Add a method to allow colored sign changes 6d913552 Update to Minecraft 1.14.3-pre4 CraftBukkit Changes: f1f33559 Update to Minecraft 1.14.3 8a3d3f49 SPIGOT-5098: Add a method to allow colored sign changes 533290e2 SPIGOT-5100: Console warning from pig zombie targeting 6dde4b9f SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants 9af90077 SPIGOT-5097: Bukkit.clearRecipes() no longer working 38fa220f Fix setting game rules via the API fe3930ce Update to Minecraft 1.14.3-pre4 da071ec5 Remove outdated build delay. Spigot Changes: 4d2f30f1 Update to Minecraft 1.14.3 f16400e3 Update to Minecraft 1.14.3-pre4
99 lines
3.9 KiB
Diff
99 lines
3.9 KiB
Diff
From 07d9bf17efeb0de32a8d0d7ab72d6c139d1d51e8 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 1ed58f4bba..a797a57671 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -124,4 +124,19 @@ public class PaperWorldConfig {
|
|
if (fallingBlockHeightNerf != 0) log("Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
|
|
if (entityTNTHeightNerf != 0) log("TNT Entity Height Limit set to Y: " + entityTNTHeightNerf);
|
|
}
|
|
+
|
|
+ public int netherVoidTopDamageHeight;
|
|
+ public boolean doNetherTopVoidDamage() { return netherVoidTopDamageHeight > 0; }
|
|
+ private void netherVoidTopDamageHeight() {
|
|
+ netherVoidTopDamageHeight = getInt("nether-ceiling-void-damage-height", 0);
|
|
+ log("Top of the nether void damage height: " + netherVoidTopDamageHeight);
|
|
+
|
|
+ if (PaperConfig.version < 18) {
|
|
+ boolean legacy = getBoolean("nether-ceiling-void-damage", false);
|
|
+ if (legacy) {
|
|
+ netherVoidTopDamageHeight = 128;
|
|
+ set("nether-ceiling-void-damage-height", netherVoidTopDamageHeight);
|
|
+ }
|
|
+ }
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 0bfa78bd22..32ed5ac429 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -397,9 +397,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.fallDistance *= 0.5F;
|
|
}
|
|
|
|
+ // Paper start - Configurable nether ceiling damage
|
|
+ // Extracted to own function
|
|
+ /*
|
|
if (this.locY < -64.0D) {
|
|
this.af();
|
|
}
|
|
+ */
|
|
+ this.performVoidDamage();
|
|
+ // Paper end
|
|
|
|
if (!this.world.isClientSide) {
|
|
this.setFlag(0, this.fireTicks > 0);
|
|
@@ -409,6 +415,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.world.getMethodProfiler().exit();
|
|
}
|
|
|
|
+ // Paper start
|
|
+ protected void performVoidDamage() {
|
|
+ if (this.locY < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
|
+ && world.paperConfig.doNetherTopVoidDamage()
|
|
+ && this.locY >= world.paperConfig.netherVoidTopDamageHeight)) {
|
|
+
|
|
+ this.doVoidDamage();
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
protected void E() {
|
|
if (this.portalCooldown > 0) {
|
|
--this.portalCooldown;
|
|
@@ -484,6 +501,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.fireTicks = 0;
|
|
}
|
|
|
|
+ protected final void doVoidDamage() { this.af(); } // Paper - OBFHELPER
|
|
protected void af() {
|
|
this.die();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
index ff5d128176..e1a684b370 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
@@ -182,9 +182,15 @@ public abstract class EntityMinecartAbstract extends Entity {
|
|
this.setDamage(this.getDamage() - 1.0F);
|
|
}
|
|
|
|
+ // Paper start - Configurable nether ceiling damage
|
|
+ // Extracted to own function
|
|
+ /*
|
|
if (this.locY < -64.0D) {
|
|
this.af();
|
|
}
|
|
+ */
|
|
+ this.performVoidDamage();
|
|
+ // Paper end
|
|
|
|
// this.doPortalTick(); // CraftBukkit - handled in postTick
|
|
if (this.world.isClientSide) {
|
|
--
|
|
2.22.0
|
|
|