aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0342-Add-option-to-disable-pillager-patrols.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0342-Add-option-to-disable-pillager-patrols.patch')
-rw-r--r--patches/server/0342-Add-option-to-disable-pillager-patrols.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0342-Add-option-to-disable-pillager-patrols.patch b/patches/server/0342-Add-option-to-disable-pillager-patrols.patch
new file mode 100644
index 0000000000..83d2a56ecb
--- /dev/null
+++ b/patches/server/0342-Add-option-to-disable-pillager-patrols.patch
@@ -0,0 +1,33 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: William Blake Galbreath <[email protected]>
+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 4cbb5e77dad6b096a7de818300c6fc112d983ceb..3510509a02b5c0de695b55792c035943ceaef222 100644
+--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
++++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+@@ -457,5 +457,10 @@ public class PaperWorldConfig {
+ private void disableRelativeProjectileVelocity() {
+ disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false);
+ }
++
++ public boolean disablePillagerPatrols = false;
++ private void pillagerSettings() {
++ disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols);
++ }
+ }
+
+diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
+index 96da518295362665270bcd5ff3031f1d9a152b1f..4fc90f8a1fa199a1af6c125ccadcb78c970671ec 100644
+--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
++++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
+@@ -23,6 +23,7 @@ public class PatrolSpawner implements CustomSpawner {
+
+ @Override
+ public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) {
++ if (world.paperConfig.disablePillagerPatrols) return 0; // Paper
+ if (!spawnMonsters) {
+ return 0;
+ } else if (!world.getGameRules().getBoolean(GameRules.RULE_DO_PATROL_SPAWNING)) {