Optimise chunk tick iteration
When per-player mob spawning is enabled we do not need to randomly shuffle the chunk list. Additionally, we can use the NearbyPlayers class to quickly retrieve nearby players instead of possible searching all players on the server.
This commit is contained in:
parent
8d922746d9
commit
38dc3b25d8
54 changed files with 1115 additions and 1340 deletions
|
@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index a8b2ce0debe54afeb937a4f1215d6b8955037d3d..515aedcf9969b818dfdc02a16a7f7178b5bb5593 100644
|
||||
index 85b38592c87bbc071d3fc5de5db131c6626fe004..fde60133d2c5557cd8d4a4d2e3a16aa96974fcbb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1146,11 +1146,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1147,11 +1147,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue