◆ populate()
- Parameters
-
- Returns
- mixed|void
40 foreach($this->oreTypes as $type){
41 $ore =
new ObjectOre($random, $type);
42 for($i = 0; $i < $ore->type->clusterCount; ++$i){
43 $x = $random->nextRange($chunkX << 4, ($chunkX << 4) + 15);
44 $y = $random->nextRange($ore->type->minHeight, $ore->type->maxHeight);
45 $z = $random->nextRange($chunkZ << 4, ($chunkZ << 4) + 15);
46 if($ore->canPlaceObject($level, $x, $y, $z)){
47 $ore->placeObject($level, $x, $y, $z);
◆ setOreTypes()
setOreTypes |
( |
array |
$types | ) |
|
- Parameters
-
57 $this->oreTypes = $types;
The documentation for this class was generated from the following file:
- src/pocketmine/level/generator/populator/Ore.php