2021-06-11 22:37:16 +00:00
|
|
|
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/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
2022-10-07 18:43:26 +00:00
|
|
|
index ab2671c21f2f44973fb2507b178ac8e1e03bc8dc..ce5f30b761ddaa2b3b241903d75770d0c5050d92 100644
|
2021-06-11 22:37:16 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2022-10-07 18:43:26 +00:00
|
|
|
@@ -705,7 +705,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
2021-06-11 22:37:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void checkOutOfWorld() {
|
|
|
|
- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64)) {
|
|
|
|
+ // Paper start - Configurable nether ceiling damage
|
|
|
|
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
2022-06-09 08:51:45 +00:00
|
|
|
+ && level.paperConfig().environment.netherCeilingVoidDamageHeight > 0
|
2022-10-07 18:43:26 +00:00
|
|
|
+ && this.getY() >= this.level.paperConfig().environment.netherCeilingVoidDamageHeight
|
|
|
|
+ && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
2021-06-11 22:37:16 +00:00
|
|
|
+ // Paper end
|
|
|
|
this.outOfWorld();
|
|
|
|
}
|
|
|
|
|