Do not store a pre-compressed cache for crafting data

this reduces bandwidth efficiency because it can't be compressed with everything else this way. If we want to cache stuff sent during the login sequence, it's better to stuff a bunch of stuff into a batch (e.g. crafting, creative, actor ids, biome defs) and pre-compress that as one big package instead.
This commit is contained in:
Dylan K. Taylor
2020-11-11 18:20:03 +00:00
parent 8f36957c10
commit c4d35d52e8
2 changed files with 12 additions and 22 deletions

View File

@ -100,7 +100,7 @@ class PreSpawnPacketHandler extends PacketHandler{
$this->session->getInvManager()->syncAll();
$this->session->getInvManager()->syncCreative();
$this->session->getInvManager()->syncSelectedHotbarSlot();
$this->session->queueCompressed($this->server->getCraftingManager()->getCraftingDataPacket($this->session->getCompressor()));
$this->session->sendDataPacket($this->server->getCraftingManager()->getCraftingDataPacket());
$this->session->syncPlayerList($this->server->getOnlinePlayers());
}