diff options
author | kickash32 <[email protected]> | 2019-06-12 21:54:16 -0400 |
---|---|---|
committer | kickash32 <[email protected]> | 2019-07-13 13:38:22 -0700 |
commit | fa726c3f7686298013f64de453707e9037d42cf2 (patch) | |
tree | fe33675a8bda9452b6decb8def8a3a7ddbaeff9e /removed | |
parent | 97488cca46a9d529546128ea2513cd7a73af5ec0 (diff) | |
download | Paper-fa726c3f7686298013f64de453707e9037d42cf2.tar.gz Paper-fa726c3f7686298013f64de453707e9037d42cf2.zip |
Create 0402-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
delete old patch
Comment didn't make sense
Use original header
use original date in header
Diffstat (limited to 'removed')
-rw-r--r-- | removed/1.14/0423-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/removed/1.14/0423-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/removed/1.14/0423-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch deleted file mode 100644 index c96473b008..0000000000 --- a/removed/1.14/0423-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 07bc019d7485fc75328f148ca9498a5216a3f657 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 a70a64070e..bfd690eccd 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -598,4 +598,14 @@ public class PaperWorldConfig { - log("Using vanilla redstone algorithm."); - } - } -+ -+ 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)"); -+ } -+ } - } -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java b/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java -index a10a5bc138..a5a63f8004 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldEntityList.java -@@ -7,6 +7,7 @@ import net.minecraft.server.IAnimal; - import net.minecraft.server.MinecraftServer; - import net.minecraft.server.World; - import net.minecraft.server.WorldServer; -+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; - - import java.util.ArrayList; - import java.util.Collection; -@@ -90,7 +91,12 @@ public class PaperWorldEntityList extends ArrayList<Entity> { - } - - public void updateEntityCount(Entity entity, int amt) { -- if (!(entity instanceof IAnimal)) return; -+ // Only count natural spawns so that mob -+ if (!(entity instanceof IAnimal) || ( -+ !world.paperConfig.countAllMobsForSpawning && -+ entity.spawnReason != SpawnReason.NATURAL && -+ entity.spawnReason != SpawnReason.CHUNK_GEN -+ )) return; - - if (entity instanceof EntityInsentient) { - EntityInsentient entityinsentient = (EntityInsentient) entity; --- -2.21.0 - |