Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 03:20:07 +01:00
3496f2d7e4
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this 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: b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses CraftBukkit Changes:38cf676e
SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GENb446cb5d
SPIGOT-4527: Fix sponges with waterlogged blocks6ec8ea5c
SPIGOT-4526: Add conversion time API for Zombie & subclassesc64fe508
Mappings Updatea3c2ec03
Fix missing ServerListPingEvent call for legacy pings Spigot Changes: 1dc156ce Rebuild patches 140f654d Mappings Update
88 Zeilen
3.3 KiB
Diff
88 Zeilen
3.3 KiB
Diff
From 65611361ad1379efabc6de8576ae3282f808ff3b 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 1ed58f4bb..39d565db1 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -124,4 +124,10 @@ 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 boolean netherVoidTopDamage;
|
|
+ private void netherVoidTopDamage() {
|
|
+ netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false );
|
|
+ log("Top of the nether void damage: " + netherVoidTopDamage);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index cc6ae6634..99716419e 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -463,9 +463,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.aa();
|
|
}
|
|
+ */
|
|
+ this.checkAndDoHeightDamage();
|
|
+ // Paper end
|
|
|
|
if (!this.world.isClientSide) {
|
|
this.setFlag(0, this.fireTicks > 0);
|
|
@@ -475,6 +481,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.world.methodProfiler.exit();
|
|
}
|
|
|
|
+ // Paper start
|
|
+ protected void checkAndDoHeightDamage() {
|
|
+ if (this.locY < -64.0D || (this.world.paperConfig.netherVoidTopDamage && this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this.locY >= 128.0D)) {
|
|
+ this.kill();
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
protected void E() {
|
|
if (this.portalCooldown > 0) {
|
|
--this.portalCooldown;
|
|
@@ -526,6 +540,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.fireTicks = 0;
|
|
}
|
|
|
|
+ protected final void kill() { this.aa(); } // Paper - OBFHELPER
|
|
protected void aa() {
|
|
this.die();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
index a2f334968..e741c7f83 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
|
@@ -195,9 +195,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
|
|
this.setDamage(this.getDamage() - 1.0F);
|
|
}
|
|
|
|
+ // Paper start - Configurable nether ceiling damage
|
|
+ // Extracted to own function
|
|
+ /*
|
|
if (this.locY < -64.0D) {
|
|
this.aa();
|
|
}
|
|
+ */
|
|
+ this.checkAndDoHeightDamage();
|
|
+ // Paper end
|
|
|
|
int i;
|
|
|
|
--
|
|
2.20.0
|
|
|