Skip to content

Commit 6df4641

Browse files
authored
Use destination world when preloading spawn chunk (#7441)
1 parent 46ed080 commit 6df4641

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

patches/server/0363-Fix-items-vanishing-through-end-portal.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ Quickly loading the exact world spawn chunk before searching the
1313
heightmap resolves the issue without having to load all spawn chunks.
1414

1515
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
16-
index 62f19eafbb650dfbfac31c320e4883149d327e43..a9705e54b88339e2746348aee9ab1acdae5182b2 100644
16+
index 62f19eafbb650dfbfac31c320e4883149d327e43..ae0ae298ff7ae129959ff6e4024eb7060c0786e4 100644
1717
--- a/src/main/java/net/minecraft/world/entity/Entity.java
1818
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
19-
@@ -3026,6 +3026,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
20-
BlockPos blockposition1;
21-
19+
@@ -3028,6 +3028,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
2220
if (flag1) {
23-
+ // Paper start - Ensure spawn chunk is always loaded before calculating Y coordinate
24-
+ this.level.getChunkAt(((ServerLevel) this.level).getSharedSpawnPos());
25-
+ // Paper end
2621
blockposition1 = ServerLevel.END_SPAWN_POINT;
2722
} else {
23+
+ // Paper start - Ensure spawn chunk is always loaded before calculating Y coordinate
24+
+ destination.getChunkAt(destination.getSharedSpawnPos());
25+
+ // Paper end
2826
blockposition1 = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, destination.getSharedSpawnPos());
27+
}
28+
// CraftBukkit start

0 commit comments

Comments
 (0)