mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
Use destination world when preloading spawn chunk (#7441)
This commit is contained in:
parent
46ed080d3b
commit
6df46412cf
@ -13,16 +13,16 @@ Quickly loading the exact world spawn chunk before searching the
|
||||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 62f19eafbb650dfbfac31c320e4883149d327e43..a9705e54b88339e2746348aee9ab1acdae5182b2 100644
|
||||
index 62f19eafbb650dfbfac31c320e4883149d327e43..ae0ae298ff7ae129959ff6e4024eb7060c0786e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3026,6 +3026,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
BlockPos blockposition1;
|
||||
|
||||
@@ -3028,6 +3028,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user