mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-09 06:50:32 +08:00
Add option to disable pillager patrols (#2626)
This commit is contained in:
parent
23e53aab97
commit
4a97a7ca44
@ -0,0 +1,35 @@
|
||||
From 9a9694a16a2e8c10e03e2f7782a0ff6bbc86a9b3 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 3e5571f7d..68d36a512 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -635,4 +635,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 a9d32ebdf..44c70e047 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 {
|
||||
--
|
||||
2.24.0
|
||||
|
Loading…
Reference in New Issue
Block a user