From 4a97a7ca44b1a07d51d21e662029bca03c932cc3 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 24 Nov 2019 01:10:15 -0600 Subject: [PATCH] Add option to disable pillager patrols (#2626) --- ...d-option-to-disable-pillager-patrols.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch diff --git a/Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch new file mode 100644 index 0000000000..3eda1022c6 --- /dev/null +++ b/Spigot-Server-Patches/0424-Add-option-to-disable-pillager-patrols.patch @@ -0,0 +1,35 @@ +From 9a9694a16a2e8c10e03e2f7782a0ff6bbc86a9b3 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Wed, 9 Oct 2019 21:46:15 -0500 +Subject: [PATCH] Add option to disable pillager patrols + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +index 3e5571f7d..68d36a512 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +@@ -635,4 +635,9 @@ public class PaperWorldConfig { + private void generatorSettings() { + generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); + } ++ ++ public boolean disablePillagerPatrols = false; ++ private void pillagerSettings() { ++ disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); ++ } + } +diff --git a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java +index a9d32ebdf..44c70e047 100644 +--- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java ++++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java +@@ -9,6 +9,7 @@ public class MobSpawnerPatrol { + public MobSpawnerPatrol() {} + + public int a(WorldServer worldserver, boolean flag, boolean flag1) { ++ if (worldserver.paperConfig.disablePillagerPatrols) return 0; // Paper + if (!flag) { + return 0; + } else { +-- +2.24.0 +