diff --git a/src/block/Sapling.php b/src/block/Sapling.php index 57b16408b..cb9d36b02 100644 --- a/src/block/Sapling.php +++ b/src/block/Sapling.php @@ -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;