41 if(mt_rand(1, 5) === 1){
42 $face = Facing::ALL[array_rand(Facing::ALL)];
44 $adjacent = $this->getSide($face);
49 if($adjacent->getTypeId() === BlockTypeIds::AIR){
50 $newStage = AmethystCluster::STAGE_SMALL_BUD;
52 $adjacent->getTypeId() === BlockTypeIds::AMETHYST_CLUSTER &&
54 $adjacent->getStage() < AmethystCluster::STAGE_CLUSTER &&
55 $adjacent->getFacing() === $face
57 $newStage = $adjacent->getStage() + 1;
59 if($newStage !==
null){
60 BlockEventHelper::grow($adjacent, VanillaBlocks::AMETHYST_CLUSTER()->setStage($newStage)->setFacing($face),
null);