32 private array $storage
35 public function getXSize() : int{ return $this->xSize; }
37 public function getYSize() : int{ return $this->ySize; }
39 public function getZSize() : int{ return $this->zSize; }
44 public function getStorage() : array{ return $this->storage; }
46 public static function read(ByteBufferReader $in) : self{
47 $xSize = Byte::readUnsigned($in);
48 $ySize = Byte::readUnsigned($in);
49 $zSize = Byte::readUnsigned($in);
52 for($i = 0, $storageCount = VarInt::readUnsignedInt($in); $i < $storageCount; ++$i){
53 $storage[] = Byte::readUnsigned($in);
64 public function write(ByteBufferWriter $out) : void{
65 Byte::writeUnsigned($out, $this->xSize);
66 Byte::writeUnsigned($out, $this->ySize);
67 Byte::writeUnsigned($out, $this->zSize);
69 VarInt::writeUnsignedInt($out, count($this->storage));
70 foreach($this->storage as $value){
71 Byte::writeUnsigned($out, $value);