Skip to content

Commit 9934c17

Browse files
Owen1212055Spottedleaf
authored andcommitted
Set chunk loading radius to 0 in PlayerSpawnFinder
Tuinity/Moonrise#143 Fixes incorrect port from the Moonrise mixin causing a significant number of chunks to be loaded for spawn.
1 parent 13e9c10 commit 9934c17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paper-server/patches/features/0001-Moonrise-optimisation-patches.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25711,7 +25711,7 @@ index 302841522cf990c38b1493b716048c0f2db40726..7932a6676db7b652d63be5ae4dcf9bcf
2571125711
}
2571225712
}
2571325713
diff --git a/net/minecraft/server/level/PlayerSpawnFinder.java b/net/minecraft/server/level/PlayerSpawnFinder.java
25714-
index fbbddc9ae0ed4e28602ab1103d860e4639f19c8f..0766c5a6de4d43c24fac1f5318ebf94bb333f307 100644
25714+
index fbbddc9ae0ed4e28602ab1103d860e4639f19c8f..f637d14b0188728192b543d7841e99a98f0c5269 100644
2571525715
--- a/net/minecraft/server/level/PlayerSpawnFinder.java
2571625716
+++ b/net/minecraft/server/level/PlayerSpawnFinder.java
2571725717
@@ -122,9 +122,7 @@ public class PlayerSpawnFinder {
@@ -25721,7 +25721,7 @@ index fbbddc9ae0ed4e28602ab1103d860e4639f19c8f..0766c5a6de4d43c24fac1f5318ebf94b
2572125721
- this.level
2572225722
- .getChunkSource()
2572325723
- .addTicketAndLoadWithRadius(TicketType.SPAWN_SEARCH, new ChunkPos(sectionPosX, sectionPosZ), 0)
25724-
+ ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().chunkHolderManager.addTicketAndLoadWithRadius(TicketType.SPAWN_SEARCH, new ChunkPos(sectionPosX, sectionPosZ), radius, net.minecraft.world.level.chunk.status.ChunkStatus.FULL, ca.spottedleaf.concurrentutil.util.Priority.HIGH) // Paper - rewrite chunk system
25724+
+ ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().chunkHolderManager.addTicketAndLoadWithRadius(TicketType.SPAWN_SEARCH, new ChunkPos(sectionPosX, sectionPosZ), 0, net.minecraft.world.level.chunk.status.ChunkStatus.FULL, ca.spottedleaf.concurrentutil.util.Priority.HIGH) // Paper - rewrite chunk system
2572525725
.whenCompleteAsync((object, throwable) -> {
2572625726
if (throwable == null) {
2572725727
try {

0 commit comments

Comments
 (0)