aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
diff options
context:
space:
mode:
authorMariell <[email protected]>2020-11-08 11:00:43 +0100
committerGitHub <[email protected]>2020-11-08 10:00:43 +0000
commite38eceb42a106568e4db5830b936e550dbe509f5 (patch)
tree0be6f3121253e45f5b23788765b10b8f6192421a /Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
parent2609a118e89ccb83edd20285a96dc5d47d19a8d4 (diff)
downloadPaper-e38eceb42a106568e4db5830b936e550dbe509f5.tar.gz
Paper-e38eceb42a106568e4db5830b936e550dbe509f5.zip
Updated Upstream (Spigot) (#4745)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Spigot Changes: a19903d2 SPIGOT-520: Add option to disable player data saving
Diffstat (limited to 'Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch')
-rw-r--r--Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
deleted file mode 100644
index 2ee549d0a8..0000000000
--- a/Spigot-Server-Patches/0364-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Aikar <[email protected]>
-Date: Sun, 24 Mar 2019 01:01:32 -0400
-Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob
- limit
-
-This resolves the super common complaint about mobs not spawning.
-
-This was ultimately a flaw in the vanilla count algorithim that allows
-spawners and other misc mobs to count against the mob limit, which are
-not bounded, and can prevent the entire world from spawning new.
-
-I believe Bukkits changes around persistence may of actually made it
-worse than vanilla.
-
-This should fully solve all of the issues around it so that only natural
-influences natural spawns.
-
-diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-index 75c30889ec186dbae35159d9a4a38494fad0f6df..18874a9b57cafb5c5c4fbcf87a3ecfd9ebb96440 100644
---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
-@@ -457,6 +457,16 @@ public class PaperWorldConfig {
- maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24);
- }
-
-+ public boolean countAllMobsForSpawning = false;
-+ private void countAllMobsForSpawning() {
-+ countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false);
-+ if (countAllMobsForSpawning) {
-+ log("Counting all mobs for spawning. Mob farms may reduce natural spawns elsewhere in world.");
-+ } else {
-+ log("Using improved mob spawn limits (Only Natural Spawns impact spawn limits for more natural spawns)");
-+ }
-+ }
-+
- public boolean antiXray;
- public EngineMode engineMode;
- public int maxChunkSectionIndex;
-diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
-index 2561ba9b9c02ccb59bd7284ddfe62889911d4220..99d4d6b4bdedcba7964ddc99467b8f8e5229b98a 100644
---- a/src/main/java/net/minecraft/server/SpawnerCreature.java
-+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
-@@ -48,6 +48,13 @@ public final class SpawnerCreature {
- EnumCreatureType enumcreaturetype = entity.getEntityType().e();
-
- if (enumcreaturetype != EnumCreatureType.MISC) {
-+ // Paper start - Only count natural spawns
-+ if (!entity.world.paperConfig.countAllMobsForSpawning &&
-+ !(entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL ||
-+ entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) {
-+ continue;
-+ }
-+ // Paper end
- BlockPosition blockposition = entity.getChunkCoordinates();
- long j = ChunkCoordIntPair.pair(blockposition.getX() >> 4, blockposition.getZ() >> 4);
-