2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.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
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2022-03-30 22:28:38 +02:00
|
|
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
2021-06-12 00:37:16 +02:00
|
|
|
public void checkOutOfWorld() {
|
|
|
|
- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64)) {
|
2021-06-11 14:02:28 +02:00
|
|
|
+ // Paper start - Configurable nether ceiling damage
|
2021-06-12 00:37:16 +02:00
|
|
|
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
2022-06-09 10:51:45 +02:00
|
|
|
+ && level.paperConfig().environment.netherCeilingVoidDamageHeight > 0
|
2022-10-07 20:43:26 +02:00
|
|
|
+ && this.getY() >= this.level.paperConfig().environment.netherCeilingVoidDamageHeight
|
|
|
|
+ && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
2021-06-12 00:37:16 +02:00
|
|
|
+ // Paper end
|
|
|
|
this.outOfWorld();
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|