ResourcePacksSessionHandler: moar debug

This commit is contained in:
Dylan K. Taylor 2019-06-18 15:10:58 +01:00
parent 94299534b3
commit 87c3636d44

View File

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace pocketmine\network\mcpe\handler;
use function count;
use pocketmine\network\mcpe\NetworkSession;
use pocketmine\network\mcpe\protocol\ResourcePackChunkDataPacket;
use pocketmine\network\mcpe\protocol\ResourcePackChunkRequestPacket;
@ -60,6 +61,7 @@ class ResourcePacksSessionHandler extends SessionHandler{
public function setUp() : void{
$this->session->sendDataPacket(ResourcePacksInfoPacket::create($this->resourcePackManager->getResourceStack(), [], $this->resourcePackManager->resourcePacksRequired(), false));
$this->session->getLogger()->debug("Waiting for client to accept resource packs");
}
private function disconnectWithError(string $error) : void{
@ -96,12 +98,15 @@ class ResourcePacksSessionHandler extends SessionHandler{
$pack->getSha256()
));
}
$this->session->getLogger()->debug("Player requested download of " . count($packet->packIds) . " resource packs");
break;
case ResourcePackClientResponsePacket::STATUS_HAVE_ALL_PACKS:
$this->session->sendDataPacket(ResourcePackStackPacket::create($this->resourcePackManager->getResourceStack(), [], $this->resourcePackManager->resourcePacksRequired(), false));
$this->session->getLogger()->debug("Applying resource pack stack");
break;
case ResourcePackClientResponsePacket::STATUS_COMPLETED:
$this->session->getLogger()->debug("Resource packs sequence completed");
$this->session->onResourcePacksDone();
break;
default: