"Fixed" resource packs

TODO: new fields
This commit is contained in:
Dylan K. Taylor 2017-04-12 11:53:51 +01:00
parent cb7264e0e5
commit 7c66af5994

View File

@ -45,6 +45,7 @@ class ResourcePacksInfoPacket extends DataPacket{
$version = $this->getString(); $version = $this->getString();
$size = $this->getLLong(); $size = $this->getLLong();
$this->behaviorPackEntries[] = new ResourcePackInfoEntry($id, $version, $size); $this->behaviorPackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
} }
$resourcePackCount = $this->getLShort(); $resourcePackCount = $this->getLShort();
@ -53,6 +54,7 @@ class ResourcePacksInfoPacket extends DataPacket{
$version = $this->getString(); $version = $this->getString();
$size = $this->getLLong(); $size = $this->getLLong();
$this->resourcePackEntries[] = new ResourcePackInfoEntry($id, $version, $size); $this->resourcePackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
}*/ }*/
} }
@ -65,12 +67,14 @@ class ResourcePacksInfoPacket extends DataPacket{
$this->putString($entry->getPackId()); $this->putString($entry->getPackId());
$this->putString($entry->getPackVersion()); $this->putString($entry->getPackVersion());
$this->putLLong($entry->getPackSize()); $this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
} }
$this->putLShort(count($this->resourcePackEntries)); $this->putLShort(count($this->resourcePackEntries));
foreach($this->resourcePackEntries as $entry){ foreach($this->resourcePackEntries as $entry){
$this->putString($entry->getPackId()); $this->putString($entry->getPackId());
$this->putString($entry->getPackVersion()); $this->putString($entry->getPackVersion());
$this->putLLong($entry->getPackSize()); $this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
} }
} }