Tree
Properties
$leafBlock
php
public \pocketmine\block\Block $leafBlock$treeHeight
php
public int $treeHeight$trunkBlock
php
public \pocketmine\block\Block $trunkBlockMethods
__construct()
php
public function __construct(\pocketmine\block\Block $trunkBlock, \pocketmine\block\Block $leafBlock, int $treeHeight = 7)canOverride() protected
php
protected function canOverride(\pocketmine\block\Block $block) : boolcanPlaceObject()
php
public function canPlaceObject(\pocketmine\world\ChunkManager $world, int $x, int $y, int $z, \pocketmine\utils\Random $random) : boolgenerateTrunkHeight() protected
php
protected function generateTrunkHeight(\pocketmine\utils\Random $random) : intgetBlockTransaction()
php
public function getBlockTransaction(\pocketmine\world\ChunkManager $world, int $x, int $y, int $z, \pocketmine\utils\Random $random) : ?\pocketmine\world\BlockTransactionReturns the BlockTransaction containing all the blocks the tree would change upon growing at the given coordinates or null if the tree can't be grown
placeCanopy() protected
php
protected function placeCanopy(int $x, int $y, int $z, \pocketmine\utils\Random $random, \pocketmine\world\BlockTransaction $transaction) : voidplaceTrunk() protected
php
protected function placeTrunk(int $x, int $y, int $z, \pocketmine\utils\Random $random, int $trunkHeight, \pocketmine\world\BlockTransaction $transaction) : void