Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
37 Zeilen
1.5 KiB
Diff
37 Zeilen
1.5 KiB
Diff
From 5e6e2224d8de860af1cd4aa4a540f5d43bbc06f0 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <md_5@live.com.au>
|
|
Date: Tue, 2 Jul 2013 09:07:54 +1000
|
|
Subject: [PATCH] Lower Chunk Compression
|
|
|
|
Use a chunk compression level of 4 - this provides an optimal balance between speed and compression.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
|
index 4c24f80..b7840a4 100644
|
|
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
|
@@ -29,7 +29,7 @@ public class Packet51MapChunk extends Packet {
|
|
this.b = chunk.z;
|
|
this.e = flag;
|
|
ChunkMap chunkmap = a(chunk, flag, i);
|
|
- Deflater deflater = new Deflater(-1);
|
|
+ Deflater deflater = new Deflater(4); // Spigot 4 -> -1
|
|
|
|
this.d = chunkmap.c;
|
|
this.c = chunkmap.b;
|
|
diff --git a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
|
index a6e3be2..63dd8d3 100644
|
|
--- a/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
|
+++ b/src/main/java/net/minecraft/server/Packet56MapChunkBulk.java
|
|
@@ -24,7 +24,7 @@ public class Packet56MapChunkBulk extends Packet {
|
|
@Override
|
|
protected Deflater initialValue() {
|
|
// Don't use higher compression level, slows things down too much
|
|
- return new Deflater(6);
|
|
+ return new Deflater(4); // Spigot 6 -> 4
|
|
}
|
|
};
|
|
// CraftBukkit end
|
|
--
|
|
1.8.1.2
|
|
|