mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
e7f3ca4505
Allows us much greater control over the Spigot portion of the code and makes us more "proper" Credit to @Dmck2b for originally passing the idea along a while back
34 lines
1.7 KiB
Diff
34 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 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/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
|
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk extends Packet {
|
|
this.b = chunk.locZ;
|
|
this.g = flag;
|
|
ChunkMap chunkmap = a(chunk, flag, i);
|
|
- Deflater deflater = new Deflater(-1);
|
|
+ Deflater deflater = new Deflater(4); // Spigot
|
|
|
|
this.d = chunkmap.c;
|
|
this.c = chunkmap.b;
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunkBulk 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
|
|
--
|