1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-20 22:18:58 +01:00

Add support for lz4 ()

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions
paper-server
patches/sources/net/minecraft/world/level/chunk/storage
src/main/java/io/papermc/paper/configuration

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
}
}