aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1038-fixup-Paper-config-files.patch
blob: a40bcad947119c881b42585b4c225a444ae49bdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Thu, 24 Oct 2024 08:11:12 -0700
Subject: [PATCH] fixup! Paper config files


diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 450a1cc8f1624dce2daf52210d017e0732b1bdf7..4954ed9edf1e1f54cc164e48817eb5b75ea87ce0 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -31,6 +31,45 @@ public class GlobalConfiguration extends ConfigurationPart {
     public static GlobalConfiguration get() {
         return instance;
     }
+
+    public ChunkLoadingBasic chunkLoadingBasic;
+
+    public class ChunkLoadingBasic extends ConfigurationPart {
+        @Comment("The maximum rate in chunks per second that the server will send to any individual player. Set to -1 to disable this limit.")
+        public double playerMaxChunkSendRate = 75.0;
+
+        @Comment(
+            "The maximum rate at which chunks will load for any individual player. " +
+            "Note that this setting also affects chunk generations, since a chunk load is always first issued to test if a" +
+            "chunk is already generated. Set to -1 to disable this limit."
+        )
+        public double playerMaxChunkLoadRate = 100.0;
+
+        @Comment("The maximum rate at which chunks will generate for any individual player. Set to -1 to disable this limit.")
+        public double playerMaxChunkGenerateRate = -1.0;
+    }
+
+    public ChunkLoadingAdvanced chunkLoadingAdvanced;
+
+    public class ChunkLoadingAdvanced extends ConfigurationPart {
+        @Comment(
+            "Set to true if the server will match the chunk send radius that clients have configured" +
+            "in their view distance settings if the client is less-than the server's send distance."
+        )
+        public boolean autoConfigSendDistance = true;
+
+        @Comment(
+            "Specifies the maximum amount of concurrent chunk loads that an individual player can have." +
+            "Set to 0 to let the server configure it automatically per player, or set it to -1 to disable the limit."
+        )
+        public int playerMaxConcurrentChunkLoads = 0;
+
+        @Comment(
+            "Specifies the maximum amount of concurrent chunk generations that an individual player can have." +
+            "Set to 0 to let the server configure it automatically per player, or set it to -1 to disable the limit."
+        )
+        public int playerMaxConcurrentChunkGenerates = 0;
+    }
     static void set(GlobalConfiguration instance) {
         GlobalConfiguration.instance = instance;
     }
@@ -146,21 +185,6 @@ public class GlobalConfiguration extends ConfigurationPart {
         public int incomingPacketThreshold = 300;
     }
 
-    public ChunkLoading chunkLoading;
-
-    public class ChunkLoading extends ConfigurationPart {
-        public int minLoadRadius = 2;
-        public int maxConcurrentSends = 2;
-        public boolean autoconfigSendDistance = true;
-        public double targetPlayerChunkSendRate = 100.0;
-        public double globalMaxChunkSendRate = -1.0;
-        public boolean enableFrustumPriority = false;
-        public double globalMaxChunkLoadRate = -1.0;
-        public double playerMaxConcurrentLoads = 20.0;
-        public double globalMaxConcurrentLoads = 500.0;
-        public double playerMaxChunkLoadRate = -1.0;
-    }
-
     public UnsupportedSettings unsupportedSettings;
 
     public class UnsupportedSettings extends ConfigurationPart {
@@ -219,7 +243,7 @@ public class GlobalConfiguration extends ConfigurationPart {
 
         @PostProcess
         private void postProcess() {
-            //io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.init(this);
+
         }
     }