2020-02-14 19:47:05 +00:00
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.
2021-03-16 07:19:45 +00:00
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
2021-06-11 06:29:15 +00:00
index 6770307d69c6b3934bfa804fd713cade22f0fb5c..4a71f9a8a57ed123b31c725a8bd5f94ab0e2174d 100644
2021-03-16 07:19:45 +00:00
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
2021-03-16 13:04:28 +00:00
@@ -825,7 +825,7 @@ public class ChunkProviderServer extends IChunkProvider {
2020-02-14 19:47:05 +00:00
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);