PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\world\generator\object\Tree Class Reference
+ Inheritance diagram for pocketmine\world\generator\object\Tree:
+ Collaboration diagram for pocketmine\world\generator\object\Tree:

Public Member Functions

 __construct (protected Block $trunkBlock, protected Block $leafBlock, protected int $treeHeight=7)
 
 canPlaceObject (ChunkManager $world, int $x, int $y, int $z, Random $random)
 
 getBlockTransaction (ChunkManager $world, int $x, int $y, int $z, Random $random)
 

Protected Member Functions

 canOverride (Block $block)
 
 generateTrunkHeight (Random $random)
 
 placeCanopy (int $x, int $y, int $z, Random $random, BlockTransaction $transaction)
 
 placeTrunk (int $x, int $y, int $z, Random $random, int $trunkHeight, BlockTransaction $transaction)
 

Detailed Description

Definition at line 35 of file object/Tree.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\generator\object\Tree::__construct ( protected Block $trunkBlock,
protected Block $leafBlock,
protected int $treeHeight = 7 )

Definition at line 36 of file object/Tree.php.

Member Function Documentation

◆ canOverride()

pocketmine\world\generator\object\Tree::canOverride ( Block $block)
protected

Definition at line 110 of file object/Tree.php.

◆ canPlaceObject()

pocketmine\world\generator\object\Tree::canPlaceObject ( ChunkManager $world,
int $x,
int $y,
int $z,
Random $random )

Definition at line 42 of file object/Tree.php.

◆ generateTrunkHeight()

pocketmine\world\generator\object\Tree::generateTrunkHeight ( Random $random)
protected

Definition at line 76 of file object/Tree.php.

◆ getBlockTransaction()

pocketmine\world\generator\object\Tree::getBlockTransaction ( ChunkManager $world,
int $x,
int $y,
int $z,
Random $random )

Returns 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

Reimplemented in pocketmine\world\generator\object\BirchTree, pocketmine\world\generator\object\OakTree, and pocketmine\world\generator\object\SpruceTree.

Definition at line 64 of file object/Tree.php.

◆ placeCanopy()

pocketmine\world\generator\object\Tree::placeCanopy ( int $x,
int $y,
int $z,
Random $random,
BlockTransaction $transaction )
protected

Definition at line 91 of file object/Tree.php.

◆ placeTrunk()

pocketmine\world\generator\object\Tree::placeTrunk ( int $x,
int $y,
int $z,
Random $random,
int $trunkHeight,
BlockTransaction $transaction )
protected

Definition at line 80 of file object/Tree.php.


The documentation for this class was generated from the following file: