◆ __construct()
Tree constructor.
- Parameters
-
◆ populate()
- Parameters
-
- Returns
- mixed|void
70 $this->level = $level;
71 $amount = $random->nextRange(0, $this->randomAmount + 1) + $this->baseAmount;
72 for($i = 0; $i < $amount; ++$i){
73 $x = $random->nextRange($chunkX << 4, ($chunkX << 4) + 15);
74 $z = $random->nextRange($chunkZ << 4, ($chunkZ << 4) + 15);
75 $y = $this->getHighestWorkableBlock($x, $z);
79 ObjectTree::growTree($this->level, $x, $y, $z, $random, $this->type);
◆ setBaseAmount()
- Parameters
-
58 $this->baseAmount = $amount;
◆ setRandomAmount()
setRandomAmount |
( |
|
$amount | ) |
|
- Parameters
-
51 $this->randomAmount = $amount;
The documentation for this class was generated from the following file:
- src/pocketmine/level/generator/populator/Tree.php