mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Updated Levels :D
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
namespace pocketmine\level\generator\object;
|
||||
|
||||
use pocketmine\block\Sapling;
|
||||
use pocketmine\level\ChunkManager;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\math\Vector3 as Vector3;
|
||||
use pocketmine\utils\Random;
|
||||
@ -36,7 +37,7 @@ class Tree{
|
||||
18 => true,
|
||||
);
|
||||
|
||||
public static function growTree(Level $level, Vector3 $pos, Random $random, $type = 0){
|
||||
public static function growTree(ChunkManager $level, $x, $y, $z, Random $random, $type = 0){
|
||||
switch($type & 0x03){
|
||||
case Sapling::SPRUCE:
|
||||
if($random->nextRange(0, 1) === 1){
|
||||
@ -62,8 +63,8 @@ class Tree{
|
||||
//}
|
||||
break;
|
||||
}
|
||||
if($tree->canPlaceObject($level, $pos, $random)){
|
||||
$tree->placeObject($level, $pos, $random);
|
||||
if($tree->canPlaceObject($level, $x, $y, $z, $random)){
|
||||
$tree->placeObject($level, $x, $y, $z, $random);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user