From 0ce0eaf3ebc018619b696c5d029bc0682a8167e7 Mon Sep 17 00:00:00 2001 From: Beech Horn <beechhorn@gmail.com> Date: Fri, 14 Feb 2020 19:47:05 +0000 Subject: [PATCH] Skip distance map update when spawning is disabled --- ...ce-map-update-when-spawning-disabled.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Spigot-Server-Patches/Skip-distance-map-update-when-spawning-disabled.patch diff --git a/Spigot-Server-Patches/Skip-distance-map-update-when-spawning-disabled.patch b/Spigot-Server-Patches/Skip-distance-map-update-when-spawning-disabled.patch new file mode 100644 index 0000000000..94b0a1bfa1 --- /dev/null +++ b/Spigot-Server-Patches/Skip-distance-map-update-when-spawning-disabled.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Beech Horn <beechhorn@gmail.com> +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/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider { + int l = this.chunkMapDistance.b(); + // Paper start - per player mob spawning + SpawnerCreature.d spawnercreature_d; // moved down +- if (this.playerChunkMap.playerMobDistanceMap != null) { ++ if ((this.allowAnimals || this.allowMonsters) && this.playerChunkMap.playerMobDistanceMap != null) { // don't update when animals and monsters are disabled + // update distance map + this.world.timings.playerMobDistanceMapUpdate.startTiming(); + this.playerChunkMap.playerMobDistanceMap.update(this.world.players, this.playerChunkMap.viewDistance);