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