From e14aff9b32500efd8dac8bcaa3f0676e01b332fb Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Sun, 3 Oct 2021 09:54:54 -0700 Subject: [PATCH] Don't count named piglins and hoglins towards mob cap (#6452) --- ...-piglins-and-hoglins-towards-mob-cap.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/0814-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch diff --git a/patches/server/0814-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0814-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch new file mode 100644 index 000000000..351633a78 --- /dev/null +++ b/patches/server/0814-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 20 Aug 2021 18:36:02 -0700 +Subject: [PATCH] Dont count named piglins and hoglins towards mob cap + + +diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +index 0b228b8bcae5ed2840ab244b6de35732f737504d..f316585ccf6baf5e7e514ba3a68b4344e781a82d 100644 +--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java ++++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +@@ -83,7 +83,7 @@ public final class NaturalSpawner { + Mob entityinsentient = (Mob) entity; + + // CraftBukkit - Split out persistent check, don't apply it to special persistent mobs +- if (entityinsentient.removeWhenFarAway(0) && entityinsentient.isPersistenceRequired()) { ++ if ((entityinsentient instanceof net.minecraft.world.entity.monster.piglin.Piglin || entityinsentient instanceof net.minecraft.world.entity.monster.hoglin.Hoglin || entityinsentient.removeWhenFarAway(0)) && entityinsentient.isPersistenceRequired()) { // Paper - what a jank fix, CBs like totally tried to change what removeWhenFarAway does, that method isnt even called here in vanilla, idk wtf is going on + continue; + } + }