Don't not shuffle visible chunks (#6283)
This commit is contained in:
parent
a44f486694
commit
8c28a33d4e
9 changed files with 51 additions and 65 deletions
|
@ -36,13 +36,13 @@ index 5ce8ac377b0d2b05dd90baa67f420945cc419609..919a489a5c7b338659c62ae67fc0a6ce
|
|||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index bafd97074461d5b17b21579ba493ba8eae8468d8..2c0dd4b5a751e413936f399106367d4b22c17dda 100644
|
||||
index c5bffd1b40ca9ae3c973044c1ad4947ba2c285ae..918555ba0af8a779ad55c7cf73f615eb804d00d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -631,6 +631,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
this.level.getProfiler().pop();
|
||||
//List<PlayerChunk> list = Lists.newArrayList(this.playerChunkMap.f()); // Paper
|
||||
//Collections.shuffle(list); // Paper
|
||||
@@ -632,6 +632,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks());
|
||||
|
||||
Collections.shuffle(list);
|
||||
+ //Paper start - call player naturally spawn event
|
||||
+ int chunkRange = level.spigotConfig.mobSpawnRange;
|
||||
+ chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
|
||||
|
@ -53,7 +53,7 @@ index bafd97074461d5b17b21579ba493ba8eae8468d8..2c0dd4b5a751e413936f399106367d4b
|
|||
+ };
|
||||
+ // Paper end
|
||||
this.level.timings.chunkTicks.startTiming(); // Paper
|
||||
this.chunkMap.getChunks().forEach((playerchunk) -> { // Paper - no... just no...
|
||||
list.forEach((playerchunk) -> {
|
||||
Optional<LevelChunk> optional = ((Either) playerchunk.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 823fc38b5bbf5eac2d2e7cc48c4b0557d252f960..fb42d7e3a1a23c02e8fd2cc04e6986ead581018c 100644
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue