21 use GetTypeIdFromConstTrait;
23 public const ID = ItemDescriptorType::INT_ID_META;
25 public function __construct(
29 if($id === 0 && $meta !== 0){
30 throw new \InvalidArgumentException(
"Meta cannot be non-zero for air");
34 public function getId() :
int{
return $this->id; }
36 public function getMeta() :
int{
return $this->meta; }
46 return new self($id, $meta);
50 $out->putLShort($this->
id);
52 $out->putLShort($this->meta);