Merged in 1.0.6 changes, added autogenerated data for 1.1.0.3 (doesn't work yet) and deliberately made the same merge error as Mojang

This commit is contained in:
Dylan K. Taylor
2017-04-14 13:00:43 +01:00
parent cdf6d200ef
commit f3ab45e7d5
19 changed files with 251 additions and 93 deletions

View File

@ -39,20 +39,22 @@ class ResourcePacksInfoPacket extends DataPacket{
public function decode(){
/*$this->mustAccept = $this->getBool();
$behaviorPackCount = $this->getUnsignedVarInt();
$behaviorPackCount = $this->getLShort();
while($behaviorPackCount-- > 0){
$id = $this->getString();
$version = $this->getString();
$size = $this->getUnsignedVarLong();
$size = $this->getLLong();
$this->behaviorPackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
}
$resourcePackCount = $this->getUnsignedVarInt();
$resourcePackCount = $this->getLShort();
while($resourcePackCount-- > 0){
$id = $this->getString();
$version = $this->getString();
$size = $this->getUnsignedVarLong();
$size = $this->getLLong();
$this->resourcePackEntries[] = new ResourcePackInfoEntry($id, $version, $size);
$this->getString();
}*/
}
@ -60,17 +62,19 @@ class ResourcePacksInfoPacket extends DataPacket{
$this->reset();
$this->putBool($this->mustAccept);
$this->putUnsignedVarInt(count($this->behaviorPackEntries));
$this->putLShort(count($this->behaviorPackEntries));
foreach($this->behaviorPackEntries as $entry){
$this->putString($entry->getPackId());
$this->putString($entry->getPackVersion());
$this->putUnsignedVarLong($entry->getPackSize());
$this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
}
$this->putUnsignedVarInt(count($this->resourcePackEntries));
$this->putLShort(count($this->resourcePackEntries));
foreach($this->resourcePackEntries as $entry){
$this->putString($entry->getPackId());
$this->putString($entry->getPackVersion());
$this->putUnsignedVarLong($entry->getPackSize());
$this->putLLong($entry->getPackSize());
$this->putString(""); //TODO
}
}