Added missing change to complete beba0ffe1578e0632e98b2c38f3c446f2ee0266c

This commit is contained in:
Dylan K. Taylor 2021-08-27 20:33:17 +01:00
parent 6c1fec8a29
commit c7f78bec15
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -32,7 +32,7 @@ use pocketmine\math\Vector3;
use pocketmine\player\Player;
use pocketmine\utils\Random;
use pocketmine\world\BlockTransaction;
use pocketmine\world\generator\object\Tree;
use pocketmine\world\generator\object\TreeFactory;
use function mt_rand;
class Sapling extends Flowable{
@ -110,7 +110,7 @@ class Sapling extends Flowable{
private function grow() : void{
$random = new Random(mt_rand());
$tree = Tree::get($random, $this->treeType);
$tree = TreeFactory::get($random, $this->treeType);
$transaction = $tree?->getBlockTransaction($this->position->getWorld(), $this->position->getFloorX(), $this->position->getFloorY(), $this->position->getFloorZ(), $random);
if($transaction === null){
return;