aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch
diff options
context:
space:
mode:
authorKyle Wood <[email protected]>2021-04-24 17:01:33 -0500
committerKyle Wood <[email protected]>2021-04-25 18:37:43 -0500
commit3093b81fee3064603c368ab934eddf66ce304433 (patch)
treecb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch
parent1af696a05d21cbdd7b5a7170f95598c013257588 (diff)
downloadPaper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz
Paper-3093b81fee3064603c368ab934eddf66ce304433.zip
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch
new file mode 100644
index 0000000000..9b9dd4ede4
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0505-Hide-sync-chunk-writes-behind-flag.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Spottedleaf <[email protected]>
+Date: Fri, 26 Jun 2020 22:35:08 -0700
+Subject: [PATCH] Hide sync chunk writes behind flag
+
+Syncing writes on each write call has terrible performance
+on harddrives.
+
+-DPaper.enable-sync-chunk-writes=true to enable
+
+diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+index b7cf02301c02ed0a6b696384e656426762ae2105..1fab9b9c7d41a0d2a551096c2c15f741a887fa2d 100644
+--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
++++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+@@ -111,7 +111,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
+ this.maxWorldSize = this.a("max-world-size", (integer) -> {
+ return MathHelper.clamp(integer, 1, 29999984);
+ }, 29999984);
+- this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true);
++ this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag
+ this.enableJmxMonitoring = this.getBoolean("enable-jmx-monitoring", false);
+ this.enableStatus = this.getBoolean("enable-status", true);
+ this.entityBroadcastRangePercentage = this.a("entity-broadcast-range-percentage", (integer) -> {