9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-20 15:29:15 +00:00

update setSeed

This commit is contained in:
NONPLAYT
2025-10-29 02:13:37 +03:00
parent c33fb58555
commit 8792d0da9e
5 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,15 @@
--- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -584,8 +_,10 @@
this.chunkMap.collectSpawningChunks(list);
profiler.popPush("shuffleSpawningChunks");
// Paper start - chunk tick iteration optimisation
- this.shuffleRandom.setSeed(this.level.random.nextLong());
- if (!this.level.paperConfig().entities.spawning.perPlayerMobSpawns) Util.shuffle(list, this.shuffleRandom); // Paper - Optional per player mob spawns; do not need this when per-player is enabled
+ if (!this.level.paperConfig().entities.spawning.perPlayerMobSpawns) {
+ this.shuffleRandom.setSeed(this.level.random.nextLong());
+ Util.shuffle(list, this.shuffleRandom); // Paper - Optional per player mob spawns; do not need this when per-player is enabled
+ }
// Paper end - chunk tick iteration optimisation
profiler.popPush("tickSpawningChunks");