From a0dc4eeb992e575cc68a887dca31cdac17a47c16 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 --- .../world/level/levelgen/PatrolSpawner.java.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch index e85d9944d3..8db0c99a25 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch @@ -1,6 +1,14 @@ --- a/net/minecraft/world/level/levelgen/PatrolSpawner.java +++ b/net/minecraft/world/level/levelgen/PatrolSpawner.java -@@ -116,7 +116,7 @@ +@@ -24,6 +24,7 @@ + + @Override + public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) { ++ if (world.paperConfig().entities.behavior.pillagerPatrols.disable) return 0; // Paper - Add option to disable pillager patrols + if (!spawnMonsters) { + return 0; + } else if (!world.getGameRules().getBoolean(GameRules.RULE_DO_PATROL_SPAWNING)) { +@@ -116,7 +117,7 @@ entitymonsterpatrolling.setPos((double) pos.getX(), (double) pos.getY(), (double) pos.getZ()); entitymonsterpatrolling.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), EntitySpawnReason.PATROL, (SpawnGroupData) null);