divide network\mcpe namespace into more subnamespaces

This commit is contained in:
Dylan K. Taylor
2019-06-27 19:39:59 +01:00
parent 872b6ed708
commit e7733718b6
29 changed files with 61 additions and 50 deletions

View File

@ -33,6 +33,10 @@ use pocketmine\event\server\DataPacketSendEvent;
use pocketmine\form\Form;
use pocketmine\math\Vector3;
use pocketmine\network\BadPacketException;
use pocketmine\network\mcpe\compression\CompressBatchPromise;
use pocketmine\network\mcpe\compression\Zlib;
use pocketmine\network\mcpe\encryption\NetworkCipher;
use pocketmine\network\mcpe\encryption\PrepareEncryptionTask;
use pocketmine\network\mcpe\handler\DeathPacketHandler;
use pocketmine\network\mcpe\handler\HandshakePacketHandler;
use pocketmine\network\mcpe\handler\InGamePacketHandler;
@ -280,7 +284,7 @@ class NetworkSession{
Timings::$playerNetworkReceiveDecompressTimer->startTiming();
try{
$stream = new PacketBatch(NetworkCompression::decompress($payload));
$stream = new PacketBatch(Zlib::decompress($payload));
}catch(\ErrorException $e){
$this->logger->debug("Failed to decompress packet: " . base64_encode($payload));
//TODO: this isn't incompatible game version if we already established protocol version