Paper/Spigot-Server-Patches/0408-Add-option-to-disable-pillager-patrols.patch
Aikar 586ee2bb11
Remove patch for MC-111480, fixed in 1.14
We were now starting entities at ID 2
2020-04-11 20:39:21 -04:00

36 lines
1.6 KiB
Diff

From bca4c8d4e91d59bf919df50953f0d20c81bbce84 Mon Sep 17 00:00:00 2001
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
index c37a0f035d..3bbf77a8ec 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -628,4 +628,9 @@ public class PaperWorldConfig {
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
index 33488b37e4..a0f5828076 100644
--- 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;
} else if (!worldserver.getGameRules().getBoolean(GameRules.DO_PATROL_SPAWNING)) {
--
2.25.1