Merge remote-tracking branch 'origin/next-minor' into next-major

This commit is contained in:
Dylan K. Taylor
2022-09-29 22:38:26 +01:00
9 changed files with 86 additions and 16 deletions

View File

@@ -65,9 +65,19 @@ class ResourcePacksPacketHandler extends PacketHandler{
){}
public function setUp() : void{
$resourcePackEntries = array_map(static function(ResourcePack $pack) : ResourcePackInfoEntry{
$resourcePackEntries = array_map(function(ResourcePack $pack) : ResourcePackInfoEntry{
//TODO: more stuff
return new ResourcePackInfoEntry($pack->getPackId(), $pack->getPackVersion(), $pack->getPackSize(), "", "", "", false);
$encryptionKey = $this->resourcePackManager->getPackEncryptionKey($pack->getPackId());
return new ResourcePackInfoEntry(
$pack->getPackId(),
$pack->getPackVersion(),
$pack->getPackSize(),
$encryptionKey ?? "",
"",
$pack->getPackId(),
false
);
}, $this->resourcePackManager->getResourceStack());
//TODO: support forcing server packs
$this->session->sendDataPacket(ResourcePacksInfoPacket::create($resourcePackEntries, [], $this->resourcePackManager->resourcePacksRequired(), false, false));