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