2020-05-06 11:22:03 +02:00
|
|
|
From 8471e9c56c520609a50898b884c3f32df04fc4df Mon Sep 17 00:00:00 2001
|
2019-11-24 08:10:15 +01:00
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
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
|
2020-05-06 10:35:20 +02:00
|
|
|
index 44210855560..1c703e48e99 100644
|
2019-11-24 08:10:15 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-05-06 10:35:20 +02:00
|
|
|
@@ -616,4 +616,9 @@ public class PaperWorldConfig {
|
2019-11-24 08:10:15 +01:00
|
|
|
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
|
2020-05-06 10:35:20 +02:00
|
|
|
index 33488b37e4d..a0f58280760 100644
|
2019-11-24 08:10:15 +01:00
|
|
|
--- 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;
|
2020-01-22 03:02:07 +01:00
|
|
|
} else if (!worldserver.getGameRules().getBoolean(GameRules.DO_PATROL_SPAWNING)) {
|
2019-11-24 08:10:15 +01:00
|
|
|
--
|
2020-05-02 00:03:47 +02:00
|
|
|
2.26.2
|
2019-11-24 08:10:15 +01:00
|
|
|
|