mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
36f34f01c0
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 Bukkit Changes: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
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 442108555604b06c6217f4330c19b4997451126c..1c703e48e99cd93be76bfeb0d9223507ba072b41 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -616,4 +616,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 33488b37e4d0dd295e0f48b59c43d30208eb531a..a0f582807605b9cc5bbf31d84907e56fba393e2e 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)) {
|