From b6b252c57d4b0e3bf756469ed9a582e38eb75a2e Mon Sep 17 00:00:00 2001 From: PureGero Date: Fri, 4 Feb 2022 18:30:13 +1000 Subject: [PATCH] Use destination world when preloading spawn chunk (#7441) --- .../Fix-items-vanishing-through-end-portal.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/server/Fix-items-vanishing-through-end-portal.patch b/patches/server/Fix-items-vanishing-through-end-portal.patch index d034930f5b..0258f9a29b 100644 --- a/patches/server/Fix-items-vanishing-through-end-portal.patch +++ b/patches/server/Fix-items-vanishing-through-end-portal.patch @@ -17,12 +17,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i - BlockPos blockposition1; - if (flag1) { -+ // Paper start - Ensure spawn chunk is always loaded before calculating Y coordinate -+ this.level.getChunkAt(((ServerLevel) this.level).getSharedSpawnPos()); -+ // Paper end blockposition1 = ServerLevel.END_SPAWN_POINT; } else { ++ // Paper start - Ensure spawn chunk is always loaded before calculating Y coordinate ++ destination.getChunkAt(destination.getSharedSpawnPos()); ++ // Paper end blockposition1 = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, destination.getSharedSpawnPos()); + } + // CraftBukkit start