81 if(!$this->getSide(
Facing::DOWN)->hasSameTypeId($this)){
82 $world = $this->position->getWorld();
83 if($this->age === self::MAX_AGE){
84 for($y = 1; $y < 3; ++$y){
85 if(!$world->isInWorld($this->position->x, $this->position->y + $y, $this->position->z)){
88 $b = $world->getBlockAt($this->position->x, $this->position->y + $y, $this->position->z);
89 if($b->getTypeId() === BlockTypeIds::AIR){
90 BlockEventHelper::grow($b, VanillaBlocks::CACTUS(),
null);
96 $world->setBlock($this->position, $this, update:
false);
99 $world->setBlock($this->position, $this, update:
false);