diff options
Diffstat (limited to 'patches/server/0330-Add-option-to-disable-pillager-patrols.patch')
-rw-r--r-- | patches/server/0330-Add-option-to-disable-pillager-patrols.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0330-Add-option-to-disable-pillager-patrols.patch b/patches/server/0330-Add-option-to-disable-pillager-patrols.patch new file mode 100644 index 0000000000..65d645b929 --- /dev/null +++ b/patches/server/0330-Add-option-to-disable-pillager-patrols.patch @@ -0,0 +1,18 @@ +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/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java +index 65d9211b812995869e58900a2873583658122312..e5918fa3be107ac3a2fc8831fd78733a7506730a 100644 +--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java ++++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java +@@ -25,6 +25,7 @@ public class PatrolSpawner implements CustomSpawner { + + @Override + public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) { ++ if (world.paperConfig().entities.behavior.pillagerPatrols.disable) return 0; // Paper + if (!spawnMonsters) { + return 0; + } else if (!world.getGameRules().getBoolean(GameRules.RULE_DO_PATROL_SPAWNING)) { |