2020-12-08 07:17:09 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Beech Horn <beechhorn@gmail.com>
|
|
|
|
Date: Mon, 7 Dec 2020 21:16:51 +0200
|
|
|
|
Subject: [PATCH] Do not update distance map when animal and mob spawning is
|
|
|
|
disabled in the particular world
|
|
|
|
|
|
|
|
Original author: Beech Horn <beechhorn@gmail.com>
|
|
|
|
Licensed under Bukkit and CraftBukkit's original license, GPLv3
|
|
|
|
The following patch should be treated as it is licensed in GPLv3
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2020-12-28 10:34:56 +01:00
|
|
|
index 12d9b73ccc2f4406957932397746cac7902d650e..a0d4a175720a2285dca2eaee96fc614104a76bcc 100644
|
2020-12-08 07:17:09 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2020-12-16 07:15:14 +01:00
|
|
|
@@ -982,7 +982,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
2020-12-08 07:17:09 +01: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) { // Yatopia
|
|
|
|
// update distance map
|
|
|
|
this.world.timings.playerMobDistanceMapUpdate.startTiming();
|
|
|
|
this.playerChunkMap.playerMobDistanceMap.update(this.world.players, this.playerChunkMap.viewDistance);
|