Paper/patches/server/0734-Prevent-softlocked-end-exit-portal-generation.patch
Jake Potrebic 9147456fc9
Updated Upstream (CraftBukkit/Spigot) (#8815)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
ab8ace685 SPIGOT-7236: Bone meal doesn't increase use statistic
7dcb59b8e Avoid switch on material in previous commit

Spigot Changes:
19641c75 SPIGOT-7235: World.Spigot#strikeLightningEffect doesn't do anything
2023-01-27 12:52:04 -08:00

23 lines
1.1 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 abd13cefd3d8409e1ef8ea70d92877f76f89da6c..230de1c71b0a6d6370df2fedb337cf0e332a7596 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
@@ -419,6 +419,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
endPodiumFeature.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation);
}