2021-09-03 20:05:01 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Noah van der Aa <ndvdaa@gmail.com>
Date: Mon, 30 Aug 2021 15:22:18 +0200
Subject: [PATCH] Prevent softlocked end exit portal generation
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
2021-10-05 05:14:11 +02:00
index dec99c9d40705a89c395437d0d050f3ab36bc17b..44551fc6fc5888206c1a2da3ece5baa486faa1d5 100644
2021-09-03 20:05:01 +02:00
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -409,6 +409,12 @@ public class EndDragonFight {
}
}
+ // Paper start - Prevent "softlocked" exit portal generation
+ if (this.portalLocation.getY() <= this.level.getMinBuildHeight()) {
2021-09-03 20:14:29 +02:00
+ this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
2021-09-03 20:05:01 +02:00
+ }
+ // Paper end
+
endPodiumFeature.configured(FeatureConfiguration.NONE).place(this.level, this.level.getChunkSource().getGenerator(), new Random(), this.portalLocation);
}