36 public static function growGrass(
ChunkManager $world,
Vector3 $pos,
Random $random,
int $count = 15,
int $radius = 10) :
void{
39 VanillaBlocks::DANDELION(),
40 VanillaBlocks::POPPY(),
41 $tallGrass = VanillaBlocks::TALL_GRASS(),
46 $arrC = count($arr) - 1;
47 for($c = 0; $c < $count; ++$c){
48 $x = $random->
nextRange($pos->x - $radius, $pos->x + $radius);
49 $z = $random->
nextRange($pos->z - $radius, $pos->z + $radius);
50 if($world->
getBlockAt($x, $pos->y + 1, $z)->getTypeId() === BlockTypeIds::AIR && $world->
getBlockAt($x, $pos->y, $z)->getTypeId() === BlockTypeIds::GRASS){