2013-12-21 23:05:27 +00:00
|
|
|
From 43faa281f12d753491d3e813982337d85065672e Mon Sep 17 00:00:00 2001
|
2013-07-01 23:08:07 +00:00
|
|
|
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.
|
|
|
|
|
2013-12-01 06:12:38 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
2013-12-13 00:10:33 +00:00
|
|
|
index 856e825..09b34e9 100644
|
2013-12-01 06:12:38 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
|
|
|
@@ -24,7 +24,7 @@ public class PacketPlayOutMapChunk extends Packet {
|
|
|
|
this.b = chunk.locZ;
|
|
|
|
this.inflatedBuffer = 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;
|
2013-12-01 03:40:53 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
2013-12-13 00:10:33 +00:00
|
|
|
index 3eac231..bf3a139 100644
|
2013-12-01 03:40:53 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
|
|
@@ -22,7 +22,7 @@ public class PacketPlayOutMapChunkBulk extends Packet {
|
2013-07-01 23:08:07 +00:00
|
|
|
@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
|
|
|
|
--
|
2013-12-01 03:40:53 +00:00
|
|
|
1.8.3.2
|
2013-07-01 23:08:07 +00:00
|
|
|
|