mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 23:29:32 +01:00
22 lines
1.2 KiB
Diff
22 lines
1.2 KiB
Diff
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
|
|
index 3d1a49d865e17a61ff74c6fe0efbd908447ee730..8d0014b0db5ab42321150938fef98458fee84b17 100644
|
|
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
@@ -469,6 +469,11 @@ public class EndDragonFight {
|
|
}
|
|
}
|
|
|
|
+ // Paper start - Prevent "softlocked" exit portal generation
|
|
+ if (this.portalLocation.getY() <= this.level.getMinBuildHeight()) {
|
|
+ this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
|
|
+ }
|
|
+ // Paper end - Prevent "softlocked" exit portal generation
|
|
if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation)) {
|
|
int i = Mth.positiveCeilDiv(4, 16);
|
|
|