mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 02:49:44 -05:00
Chunk Compression on seperate thread. Thanks to Zeerix.
This commit is contained in:
1 parent
85805e53a3
commit
6ae23e3f03
5 files changed
+149
-3
No files matched your search
@@ -16,7 +16,8 @@ public class Packet51MapChunk extends Packet {
|
||||
public int e;
|
||||
public int f;
|
||||
public byte[] g;
|
||||
private int h;
|
||||
public int h; // CraftBukkit - private -> public
|
||||
public byte[] rawData; // CraftBukkit
|
||||
|
||||
public Packet51MapChunk() {
|
||||
this.k = true;
|
||||
@@ -36,6 +37,7 @@ public class Packet51MapChunk extends Packet {
|
||||
this.d = l;
|
||||
this.e = i1;
|
||||
this.f = j1;
|
||||
/* CraftBukkit - Moved compression into its own method.
|
||||
byte[] abyte = data; // CraftBukkit - uses data from above constructor
|
||||
Deflater deflater = new Deflater(-1);
|
||||
|
||||
@@ -46,7 +48,8 @@ public class Packet51MapChunk extends Packet {
|
||||
this.h = deflater.deflate(this.g);
|
||||
} finally {
|
||||
deflater.end();
|
||||
}
|
||||
}*/
|
||||
this.rawData = data; // CraftBukkit
|
||||
}
|
||||
|
||||
public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOEXception
|
||||
|
||||
Reference in new issue
Block a user