2013-12-01 04:40:53 +01:00
|
|
|
From d6e3678b8c413d9ffb2cedc75aecb609d81d3dc8 Mon Sep 17 00:00:00 2001
|
2013-07-02 01:08:07 +02: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.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
2013-07-03 00:27:18 +02:00
|
|
|
index 91d7feb..29baf6d 100644
|
2013-07-02 01:08:07 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
2013-07-02 05:21:57 +02:00
|
|
|
@@ -29,7 +29,7 @@ public class Packet51MapChunk extends Packet {
|
2013-07-02 01:08:07 +02:00
|
|
|
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;
|
2013-12-01 04:40:53 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
|
|
|
index c3cfdc7..8e1c4cb 100644
|
|
|
|
--- 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-02 01:08:07 +02: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 04:40:53 +01:00
|
|
|
1.8.3.2
|
2013-07-02 01:08:07 +02:00
|
|
|
|