Paper/CraftBukkit-Patches/0038-Lower-Chunk-Compression.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

37 lines
1.6 KiB
Diff

From 5717bbdf08a5430b7014a788bde0cdc202f77c18 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 734faef..613c1f1 100644
--- 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.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 3eac231..bf3a139 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 {
@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.9.1