mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Chunk Compression on seperate thread. Thanks to Zeerix.
This commit is contained in:
@@ -7,6 +7,7 @@ import java.util.logging.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.craftbukkit.ChunkCompressionThread;
|
||||
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandException;
|
||||
@@ -629,6 +630,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
this.networkManager.queue(new Packet3Chat(line));
|
||||
}
|
||||
packet = null;
|
||||
} else if (packet.k == true) {
|
||||
// Reroute all low-priority packets through to compression thread.
|
||||
ChunkCompressionThread.sendPacket(this.player, packet);
|
||||
packet = null;
|
||||
}
|
||||
if (packet != null) this.networkManager.queue(packet);
|
||||
// CraftBukkit end
|
||||
|
Reference in New Issue
Block a user