67 for($i = 0, $shapesCount = VarInt::readUnsignedInt($in); $i < $shapesCount; ++$i){
68 $this->shapes[] = SerializableVoxelShape::read($in);
72 for($i = 0, $namesCount = VarInt::readUnsignedInt($in); $i < $namesCount; ++$i){
73 $name = CommonTypes::getString($in);
74 $id = LE::readUnsignedShort($in);
75 $this->nameMap[$name] = $id;
80 VarInt::writeUnsignedInt($out, count($this->shapes));
81 foreach($this->shapes as $shape){
85 VarInt::writeUnsignedInt($out, count($this->nameMap));
86 foreach($this->nameMap as $name => $id){
87 CommonTypes::putString($out, $name);
88 LE::writeUnsignedShort($out, $id);