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
|
2021-01-11 02:44:06 +01:00
|
|
|
index 290e49cf0077909ad7ab8127c01ef93cf7b70b51..e726b6213cf2e8f5b326f05c0438b8f1ee2b73c5 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
|
2021-01-11 02:44:06 +01:00
|
|
|
@@ -575,4 +575,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);
|
|
|
|
+ }
|
|
|
|
}
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
|
|
|
index 04a1af9c6742f7aa944dec80e75ff8a4ca4bf57f..cba98adb7f2711fb97c7e4120d962f46a59682e7 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
|
|
|
|
@@ -26,6 +26,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)) {
|