mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-14 23:30:06 +00:00
Added missing change to complete beba0ffe1578e0632e98b2c38f3c446f2ee0266c
This commit is contained in:
parent
6c1fec8a29
commit
c7f78bec15
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user