[ci skip] Move chunk system patch back a bit

This commit is contained in:
Nassim Jahnke 2024-01-24 13:07:40 +01:00
parent 51bef80755
commit ad2cf68a7f
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
207 changed files with 892 additions and 869 deletions

View file

@ -11,15 +11,15 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index fa592d5db10dbd4824de74658655ef61230ed431..e9cfbee008c1dda2eeac55196d490984fa62ab09 100644
index a7bf0ce6eefa60ba61975afb8885fc1857fb7959..50f8e12c964a7a0f388568e4df512ddffdda4a64 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -92,7 +92,7 @@ public class RegionFileStorage implements AutoCloseable {
return null;
}
// Paper end - cache regionfile does not exist state
@@ -37,7 +37,7 @@ public class RegionFileStorage implements AutoCloseable {
if (regionfile != null) {
return regionfile;
} else {
- if (this.regionCache.size() >= 256) {
+ if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - Sanitise RegionFileCache and make configurable.
+ if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - Sanitise RegionFileCache and make configurable
((RegionFile) this.regionCache.removeLast()).close();
}