aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0823-fixup-MC-Utils.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-10-24 08:36:07 -0700
committerSpottedleaf <[email protected]>2024-10-25 11:25:09 -0700
commit3b316215d7d8940b81ddf6e5fde8c24fbd387f39 (patch)
tree9eaea37d9689b1ddf8aa594e75c48fa96ed5ac66 /patches/server/0823-fixup-MC-Utils.patch
parent8e569ba62a3b4bf39d1669b6423b99ccffa74182 (diff)
downloadPaper-3b316215d7d8940b81ddf6e5fde8c24fbd387f39.tar.gz
Paper-3b316215d7d8940b81ddf6e5fde8c24fbd387f39.zip
Implement config hooks in PaperHooks
Diffstat (limited to 'patches/server/0823-fixup-MC-Utils.patch')
-rw-r--r--patches/server/0823-fixup-MC-Utils.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/server/0823-fixup-MC-Utils.patch b/patches/server/0823-fixup-MC-Utils.patch
index 54f6874194..60653c117b 100644
--- a/patches/server/0823-fixup-MC-Utils.patch
+++ b/patches/server/0823-fixup-MC-Utils.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] fixup! MC Utils
diff --git a/src/main/java/ca/spottedleaf/moonrise/common/PlatformHooks.java b/src/main/java/ca/spottedleaf/moonrise/common/PlatformHooks.java
new file mode 100644
-index 0000000000000000000000000000000000000000..deb64f7ebebcf6de91ffe0542d6b449a4db64da0
+index 0000000000000000000000000000000000000000..6c98d420ea84c10ef4f15d4deb3f04e610ed8548
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/moonrise/common/PlatformHooks.java
@@ -0,0 +1,117 @@
@@ -91,9 +91,9 @@ index 0000000000000000000000000000000000000000..deb64f7ebebcf6de91ffe0542d6b449a
+
+ public int configPlayerMaxConcurrentGens();
+
-+ public long configAutoSaveInterval();
++ public long configAutoSaveInterval(final ServerLevel world);
+
-+ public int configMaxAutoSavePerTick();
++ public int configMaxAutoSavePerTick(final ServerLevel world);
+
+ public boolean configFixMC159283();
+
@@ -1026,7 +1026,7 @@ index af9623240ff2d389aa7090623f507720e7dbab7d..efda2688ae1254a82ba7f6bf8bf597ef
public static int getMaxLightSection(final LevelHeightAccessor world) {
diff --git a/src/main/java/ca/spottedleaf/moonrise/paper/PaperHooks.java b/src/main/java/ca/spottedleaf/moonrise/paper/PaperHooks.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ee514a767f69de69d86e1e88d70fe37c4ab84277
+index 0000000000000000000000000000000000000000..1aa6be257ce594d7a69fdff008cd29014a04fd75
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/moonrise/paper/PaperHooks.java
@@ -0,0 +1,209 @@
@@ -1153,42 +1153,42 @@ index 0000000000000000000000000000000000000000..ee514a767f69de69d86e1e88d70fe37c
+
+ @Override
+ public boolean configAutoConfigSendDistance() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.autoConfigSendDistance;
+ }
+
+ @Override
+ public double configPlayerMaxLoadRate() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkLoadRate;
+ }
+
+ @Override
+ public double configPlayerMaxGenRate() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkGenerateRate;
+ }
+
+ @Override
+ public double configPlayerMaxSendRate() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkSendRate;
+ }
+
+ @Override
+ public int configPlayerMaxConcurrentLoads() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.playerMaxConcurrentChunkLoads;
+ }
+
+ @Override
+ public int configPlayerMaxConcurrentGens() {
-+
++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.playerMaxConcurrentChunkGenerates;
+ }
+
+ @Override
-+ public long configAutoSaveInterval() {
-+
++ public long configAutoSaveInterval(final ServerLevel world) {
++ return world.paperConfig().chunks.autoSaveInterval.value();
+ }
+
+ @Override
-+ public int configMaxAutoSavePerTick() {
-+
++ public int configMaxAutoSavePerTick(final ServerLevel world) {
++ return world.paperConfig().chunks.maxAutoSaveChunksPerTick;
+ }
+
+ @Override