Fixed Tree spawning

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-15 18:21:55 +01:00
parent d147caa913
commit 475419b693
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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();