mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Added missing change to complete beba0ffe15
This commit is contained in:
@@ -32,7 +32,7 @@ use pocketmine\math\Vector3;
|
|||||||
use pocketmine\player\Player;
|
use pocketmine\player\Player;
|
||||||
use pocketmine\utils\Random;
|
use pocketmine\utils\Random;
|
||||||
use pocketmine\world\BlockTransaction;
|
use pocketmine\world\BlockTransaction;
|
||||||
use pocketmine\world\generator\object\Tree;
|
use pocketmine\world\generator\object\TreeFactory;
|
||||||
use function mt_rand;
|
use function mt_rand;
|
||||||
|
|
||||||
class Sapling extends Flowable{
|
class Sapling extends Flowable{
|
||||||
@@ -110,7 +110,7 @@ class Sapling extends Flowable{
|
|||||||
|
|
||||||
private function grow() : void{
|
private function grow() : void{
|
||||||
$random = new Random(mt_rand());
|
$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);
|
$transaction = $tree?->getBlockTransaction($this->position->getWorld(), $this->position->getFloorX(), $this->position->getFloorY(), $this->position->getFloorZ(), $random);
|
||||||
if($transaction === null){
|
if($transaction === null){
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user