testserver/Spigot-Server-Patches/0505-Hide-sync-chunk-writes...

24 lines
1.4 KiB
Diff
Raw Normal View History

2020-06-27 05:37:38 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
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/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
index 3ecfb193be1d83d2b2c90ca9e264388dabb88c05..65961a03728852bd75367083a0de6fd0082b17cb 100644
2020-06-27 05:37:38 +00:00
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -101,7 +101,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
2020-06-27 05:37:38 +00:00
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) -> {