mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed Tree spawning
This commit is contained in:
parent
d147caa913
commit
475419b693
@ -37,7 +37,7 @@ class PineTreeObject extends TreeObject{
|
||||
public function canPlaceObject(LevelAPI $level, $x, $y, $z){
|
||||
$this->findRandomLeavesSize();
|
||||
$checkRadius = 0;
|
||||
for($yy = 0; $yy < ($this->totalHeight + 2); ++$yy) {
|
||||
for($yy = 0; $yy < $this->totalHeight; ++$yy) {
|
||||
if($yy === $this->leavesSizeY) {
|
||||
$checkRadius = $this->leavesAbsoluteMaxRadius;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class TreeObject{
|
||||
public static function growTree(LevelAPI $level, $block, $type){
|
||||
switch($type){
|
||||
case Sapling::SPRUCE:
|
||||
if(mt_rand(0,1) == 2){
|
||||
if(mt_rand(0,1) == 1){
|
||||
$tree = new SpruceTreeObject();
|
||||
}else{
|
||||
$tree = new PineTreeObject();
|
||||
|
Loading…
x
Reference in New Issue
Block a user