Use destination world when preloading spawn chunk (#7441)
This commit is contained in:
@@ -17,12 +17,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/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
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||||
BlockPos blockposition1;
|
|
||||||
|
|
||||||
if (flag1) {
|
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;
|
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||||
} else {
|
} 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());
|
blockposition1 = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, destination.getSharedSpawnPos());
|
||||||
|
}
|
||||||
|
// CraftBukkit start
|
||||||
|
|||||||
Reference in New Issue
Block a user