mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-12-02 07:33:39 +01:00
2b78178637
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 69e6a4c Updated Upstream (Paper) Purpur Changes: 391f9ad Updated Upstream (Paper)
24 lines
1.4 KiB
Diff
24 lines
1.4 KiB
Diff
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
|
|
index 84429f12d0c6e0990b7cbb1b503b7868b3a02b14..f04a5a526748f913e885b673dda793e5bb16c1b7 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
@@ -982,7 +982,7 @@ 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) { // Yatopia
|
|
// update distance map
|
|
this.world.timings.playerMobDistanceMapUpdate.startTiming();
|
|
this.playerChunkMap.playerMobDistanceMap.update(this.world.players, this.playerChunkMap.viewDistance);
|