Improve per player mob spawning (#3971)

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
Spottedleaf
2020-07-23 11:10:46 -07:00
parent 7673fda496
commit 254605cdae
2 changed files with 11 additions and 6 deletions

View File

@@ -112,6 +112,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ playerChunkMap.playerMobSpawnMap.addOrUpdate(player, chunkX, chunkZ, range);
+ player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange
+ player.playerNaturallySpawnedEvent = event;
+ }
+ // Paper end - optimize isOutisdeRange
this.world.getMethodProfiler().enter("pollingChunks");