From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Beech Horn Date: Fri, 14 Feb 2020 19:39:59 +0000 Subject: [PATCH] Skip distance map update when spawning disabled. diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java index 58c22ed8e37b22b3b304139b1746b5bc8ba6f45a..59d7f93c9364571edf2e7b613a57f8f28989cb56 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -966,7 +966,7 @@ public class ServerChunkCache extends ChunkSource { int l = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - per player mob spawning NaturalSpawner.SpawnState spawnercreature_d; // moved down - if (this.chunkMap.playerMobDistanceMap != null) { + if ((this.spawnFriendlies || this.spawnEnemies) && this.chunkMap.playerMobDistanceMap != null) { // don't update when animals and monsters are disabled // update distance map this.level.timings.playerMobDistanceMapUpdate.startTiming(); this.chunkMap.playerMobDistanceMap.update(this.level.players, this.chunkMap.viewDistance);