Add support for lz4 (#12053)

Mojang added this early 2024, however, it wasn't ever added to the actual config option
inside of paper
This commit is contained in:
Shane Freeder
2025-02-08 18:07:43 +00:00
committed by GitHub
parent 742968e078
commit 597dcfffb9
2 changed files with 3 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
@@ -61,6 +_,15 @@
@@ -61,6 +_,16 @@
private final RegionFileVersion.StreamWrapper<InputStream> inputWrapper;
private final RegionFileVersion.StreamWrapper<OutputStream> outputWrapper;
@@ -9,6 +9,7 @@
+ return switch (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.compressionFormat) {
+ case GZIP -> VERSION_GZIP;
+ case ZLIB -> VERSION_DEFLATE;
+ case LZ4 -> VERSION_LZ4;
+ case NONE -> VERSION_NONE;
+ };
+ }

View File

@@ -186,6 +186,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public enum CompressionFormat {
GZIP,
ZLIB,
LZ4,
NONE
}
}