mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
c97ce029e9
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com> Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com> Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com> Co-authored-by: stonar96 <minecraft.stonar96@gmail.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Jason <jasonpenilla2@me.com> Co-authored-by: kashike <kashike@vq.lc> Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com> Co-authored-by: KennyTV <kennytv@t-online.de> Co-authored-by: commandblockguy <commandblockguy1@gmail.com> Co-authored-by: DigitalRegent <misterwener@gmail.com> Co-authored-by: ishland <ishlandmc@yeah.net>
89 lines
3.8 KiB
Diff
89 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 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 d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937760da762 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -129,4 +129,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 7cfd035d2baa4318c306cd850ea49468ac213792..acb246076e5b127703c8080a8c5000c8cb05e4ec 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -417,9 +417,16 @@ 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.am();
|
|
}
|
|
+ */
|
|
+ this.performVoidDamage();
|
|
+ // Paper end
|
|
|
|
if (!this.world.isClientSide) {
|
|
this.setFlag(0, this.fireTicks > 0);
|
|
@@ -512,6 +519,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.setFireTicks(0);
|
|
}
|
|
|
|
+ // 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 final void doVoidDamage() { this.am(); } // Paper - OBFHELPER
|
|
protected void am() {
|
|
this.die();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
index 4a646f6609b5a85060460d7f8511b7d2d20166f4..a033000a2c85043822b7cab0dee796043ce2520f 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
@@ -292,9 +292,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.am();
|
|
}
|
|
+ */
|
|
+ this.performVoidDamage();
|
|
+ // Paper end
|
|
|
|
// this.doPortalTick(); // CraftBukkit - handled in postTick
|
|
if (this.world.isClientSide) {
|