geforkt von Mirrors/Paper
0cdce89d59
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
23 Zeilen
1.2 KiB
Diff
23 Zeilen
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 c29ccc66c95faba425acb0ca06af15e2783b4bae..44f799d595d7150f00dfdfa2f85c87386f896607 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
|
|
@@ -466,6 +466,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
|
|
if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation)) {
|
|
int i = Mth.positiveCeilDiv(4, 16);
|
|
|