Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Allow disabling village sieges entirely
Fixes GH-1944
Dieser Commit ist enthalten in:
Ursprung
e0847a4cea
Commit
3b0b967c78
37
Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch
Normale Datei
37
Spigot-Server-Patches/0381-Allow-disabling-village-sieges.patch
Normale Datei
@ -0,0 +1,37 @@
|
||||
From e7ec410152443120d21bc738121f9ccea800518b Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Sun, 7 Apr 2019 06:22:54 -0400
|
||||
Subject: [PATCH] Allow disabling village sieges
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index ba299afc..319b5b95 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -587,4 +587,10 @@ public class PaperWorldConfig {
|
||||
this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
|
||||
log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
|
||||
}
|
||||
+
|
||||
+ public boolean villageSiegesEnabled = true;
|
||||
+ private void villageSiegesEnabled() {
|
||||
+ this.villageSiegesEnabled = getBoolean("game-mechanics.village-sieges-enabled", this.villageSiegesEnabled);
|
||||
+ log("Village sieges are " + (this.villageSiegesEnabled ? "enabled" : "disabled"));
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d29420dd..e545e976 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -334,7 +334,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.methodProfiler.c("village");
|
||||
timings.doVillages.startTiming(); // Spigot
|
||||
this.villages.tick();
|
||||
- this.siegeManager.a();
|
||||
+ if (paperConfig.villageSiegesEnabled) { this.siegeManager.a(); } // Paper - Allow disabling village sieges
|
||||
timings.doVillages.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("portalForcer");
|
||||
timings.doPortalForcer.startTiming(); // Spigot
|
||||
--
|
||||
2.21.0
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren