2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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-06-27 06:57:36 +02:00
|
|
|
index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 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-06-27 06:57:36 +02:00
|
|
|
@@ -577,4 +577,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-06-26 01:38:24 +02:00
|
|
|
index e108f14b36b5459503e02146f8c11e5223d6bd61..b1fea06d29a0c98136496d6eff81e6959cb73672 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
|
2020-06-26 01:38:24 +02:00
|
|
|
@@ -10,6 +10,7 @@ public class MobSpawnerPatrol implements MobSpawner {
|
2019-11-24 08:10:15 +01:00
|
|
|
|
2020-06-26 01:38:24 +02:00
|
|
|
@Override
|
2019-11-24 08:10:15 +01:00
|
|
|
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)) {
|