8f9df2ed43
Undo the accidental renaming of a method in0aad8bf
Aikar wanted to rename DataPalette#getDataBits(T object) to getOrCreateIdFor in0aad8bf
but he also accidentally renamed ChunkPacketInfo#getDataBitsIndex(int chunkSectionIndex) to getOrCreateIdForIndex. Remove chunk-edge-mode and chunk loading entirely from Anti-Xray The chunk-edge-mode is broken since several versions. Loading chunk neighbors for chunk edge obfuscation isn't needed anymore. Unlike in previous versions, these are under normal circumstances already loaded at the time we need them (plugins for example can bypass this). Use the modified methods and constructors everywhere Anti-Xray provides support for the default nms methods and constructors, which where modified by Anti-Xray to avoid breaking stuff (plugins) which somehow uses these methods. However, the modified versions of those methods and constructors should be used where possible.
35 lines
1.6 KiB
Diff
35 lines
1.6 KiB
Diff
From b9d5e577abc7ea9c81a07c063ab9a923115d29ee 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 44210855560..1c703e48e99 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 33488b37e4d..a0f58280760 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)) {
|
|
--
|
|
2.26.2
|
|
|