mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
654b792caf
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:a339310c
#755: Fix NPE when calling getInventory() for virtual EnderChests2577f9bf
Increase outdated build delay1dabfdc8
#754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
33 lines
1.7 KiB
Diff
33 lines
1.7 KiB
Diff
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
|
|
index 6a102f56316b50c1993890d225b0eb4d619452c1..06ed45f35025a0ce16ff80fa4316d8da98ed3c6a 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -561,4 +561,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 ec5c96112cedf418a9e7f7d245a4b007b56db953..7ed89bbe465402582c9d28f0a3935758a6b0f7af 100644
|
|
--- a/src/main/java/net/minecraft/server/MobSpawnerPatrol.java
|
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerPatrol.java
|
|
@@ -10,6 +10,7 @@ public class MobSpawnerPatrol implements MobSpawner {
|
|
|
|
@Override
|
|
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)) {
|