22declare(strict_types=1);
24namespace pocketmine\block\utils;
33 protected int $age = 0;
35 protected function describeBlockOnlyState(RuntimeDataDescriber $w) : void{
36 $w->boundedIntAuto(0, self::MAX_AGE, $this->age);
39 public function getAge() : int{ return $this->age; }
44 public function setAge(
int $age) : self{
45 if($age < 0 || $age > self::MAX_AGE){
46 throw new \InvalidArgumentException(
"Age must be in range 0 ... " . self::MAX_AGE);