From 9077107f7d32968ccc2f539004960c019e54d96e Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 28 Nov 2021 16:02:52 +0100 Subject: [PATCH] Update readme, rename incremental chunk saving --- README.md | 2 +- ...aving.patch => incremental-chunk-and-player-saving.patch} | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename patches/server/{incremental-chunk-saving.patch => incremental-chunk-and-player-saving.patch} (99%) diff --git a/README.md b/README.md index 57e63dba11..a97cc1d9c7 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ How To (Compiling Jar From Source) ------ To compile Paper, you need JDK 17 and an internet connection. -Clone this repo, run `./gradlew applyPatches`, then `./gradlew createReobfBundlerJar` from your terminal. You can find the compiled jar in the `Paper-Server/build/libs` directory. +Clone this repo, run `./gradlew applyPatches`, then `./gradlew createReobfBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory. To get a full list of tasks, run `./gradlew tasks`. diff --git a/patches/server/incremental-chunk-saving.patch b/patches/server/incremental-chunk-and-player-saving.patch similarity index 99% rename from patches/server/incremental-chunk-saving.patch rename to patches/server/incremental-chunk-and-player-saving.patch index 2c51852aeb..0083f5bab2 100644 --- a/patches/server/incremental-chunk-saving.patch +++ b/patches/server/incremental-chunk-and-player-saving.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Jun 2019 03:53:22 +0100 -Subject: [PATCH] incremental chunk saving +Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -78,6 +78,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + playerSaveInterval = autosavePeriod; } + this.profiler.push("save"); ++ final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0; + try { + this.isSaving = true; + if (playerSaveInterval > 0) { @@ -85,7 +86,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + for (ServerLevel level : this.getAllLevels()) { + if (level.paperConfig.autoSavePeriod > 0) { -+ level.saveIncrementally(autosavePeriod > 0 && this.tickCount % autosavePeriod == 0); ++ level.saveIncrementally(fullSave); + } + } + } finally {