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
|
2024-08-31 20:29:50 +02:00
|
|
|
index 460744ec3a1abe9a2d9d16c2ec521c52c7f8db95..98d1c097fdbbc8080624f365634e0812a5eea5ac 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
|
2024-08-16 21:45:07 +02:00
|
|
|
@@ -468,6 +468,11 @@ public class EndDragonFight {
|
2021-09-03 20:05:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // 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
|
|
|
+ }
|
2024-01-19 12:30:04 +01:00
|
|
|
+ // Paper end - Prevent "softlocked" exit portal generation
|
2023-09-22 16:42:56 +02:00
|
|
|
if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation)) {
|
|
|
|
int i = Mth.positiveCeilDiv(4, 16);
|
2021-09-03 20:05:01 +02:00
|
|
|
|