mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Added chunk-sending.compression-level property
This commit is contained in:
parent
266b78aa31
commit
e8cc52f99e
@ -1371,6 +1371,8 @@ class Server{
|
|||||||
$this->logger->info("Advanced cache enabled");
|
$this->logger->info("Advanced cache enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Level::$COMPRESSION_LEVEL = $this->getProperty("chunk-sending.compression-level", 7);
|
||||||
|
|
||||||
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and function_exists("cli_set_process_title")){
|
||||||
@cli_set_process_title("PocketMine-MP " . $this->getPocketMineVersion());
|
@cli_set_process_title("PocketMine-MP " . $this->getPocketMineVersion());
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ use raklib\Binary;
|
|||||||
class Level implements ChunkManager, Metadatable{
|
class Level implements ChunkManager, Metadatable{
|
||||||
|
|
||||||
private static $levelIdCounter = 1;
|
private static $levelIdCounter = 1;
|
||||||
|
public static $COMPRESSION_LEVEL = 7;
|
||||||
|
|
||||||
|
|
||||||
const BLOCK_UPDATE_NORMAL = 1;
|
const BLOCK_UPDATE_NORMAL = 1;
|
||||||
@ -1261,7 +1262,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ordered = zlib_encode(Binary::writeLInt($X) . Binary::writeLInt($Z) . $orderedIds . $orderedData . $orderedSkyLight . $orderedLight . $biomeIds . $biomeColors, ZLIB_ENCODING_DEFLATE, 8);
|
$ordered = zlib_encode(Binary::writeLInt($X) . Binary::writeLInt($Z) . $orderedIds . $orderedData . $orderedSkyLight . $orderedLight . $biomeIds . $biomeColors, ZLIB_ENCODING_DEFLATE, self::$COMPRESSION_LEVEL);
|
||||||
|
|
||||||
if(ADVANCED_CACHE == true and $Yndex === 0xff){
|
if(ADVANCED_CACHE == true and $Yndex === 0xff){
|
||||||
Cache::add($identifier, $ordered, 60);
|
Cache::add($identifier, $ordered, 60);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user