27 public const ID = AttributeLayerSyncType::REMOVE_ENVIRONMENT;
35 private int $dimension,
36 private array $attributes,
39 public function getTypeId() : int{
43 public function getName() : string{ return $this->name; }
45 public function getDimension() : int{ return $this->dimension; }
53 public static function read(ByteBufferReader $in) : self{
55 $dimension = VarInt::readUnsignedInt($in);
58 for($i = 0, $len = VarInt::readUnsignedInt($in); $i < $len; ++$i){
59 $attributes[] = CommonTypes::getString($in);
69 public function write(ByteBufferWriter $out) : void{
70 CommonTypes::putString($out, $this->name);
71 VarInt::writeUnsignedInt($out, $this->dimension);
73 VarInt::writeUnsignedInt($out, count($this->attributes));
74 foreach($this->attributes as $attribute){
75 CommonTypes::putString($out, $attribute);