34 private int $dimension,
36 private array $attributes,
39 public function getName() : string{ return $this->name; }
41 public function getDimension() : int{ return $this->dimension; }
43 public function getSettings() : AttributeLayerSettings{ return $this->settings; }
51 public static function read(ByteBufferReader $in) : self{
53 $dimension = VarInt::readUnsignedInt($in);
54 $settings = AttributeLayerSettings::read($in);
57 for($i = 0, $len = VarInt::readUnsignedInt($in); $i < $len; ++$i){
58 $attributes[] = AttributeEnvironment::read($in);
69 public function write(ByteBufferWriter $out) : void{
70 CommonTypes::putString($out, $this->name);
71 VarInt::writeUnsignedInt($out, $this->dimension);
72 $this->settings->write($out);
74 VarInt::writeUnsignedInt($out, count($this->attributes));
75 foreach($this->attributes as $attribute){
76 $attribute->write($out);