2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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
|
2021-11-09 08:59:15 +01:00
|
|
|
index d3da5175ce1075511229ea52f1237898bcae9a11..a9ab8cbb739a72222dc7775f52ef2cfdc49fd29f 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-11-09 08:59:15 +01:00
|
|
|
@@ -462,5 +462,10 @@ public class PaperWorldConfig {
|
2021-06-11 14:02:28 +02: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-06-13 21:29:58 +02:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
2021-06-13 21:29:58 +02:00
|
|
|
index e0a376617f6b6232591942da0bc9d7b1ee58c2e7..744b58d59a5f34ed3bd6f2d4a0f876acfa6a7135 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
|
|
|
@@ -26,6 +26,7 @@ public class PatrolSpawner implements CustomSpawner {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int tick(ServerLevel world, boolean spawnMonsters, boolean spawnAnimals) {
|
|
|
|
+ if (world.paperConfig.disablePillagerPatrols) return 0; // Paper
|
|
|
|
if (!spawnMonsters) {
|
|
|
|
return 0;
|
|
|
|
} else if (!world.getGameRules().getBoolean(GameRules.RULE_DO_PATROL_SPAWNING)) {
|