This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-18 19:12:50 +02:00
parent b48f486620
commit f485124190
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class PineTreeObject extends TreeObject{
if($this->leavesSizeY === -1 or $this->leavesAbsoluteMaxRadius === -1) {
$this->findRandomLeavesSize();
}
$level->setBlock(new Vector3($x, $pos->y - 1, $z), new DirtBlock());
$level->setBlock(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock());
$leavesRadius = mt_rand(0,2);
$leavesMaxRadius = 1;
$leavesBottomY = $this->totalHeight - $this->leavesSizeY;

View File

@ -57,7 +57,7 @@ class SmallTreeObject extends TreeObject{
}
public function placeObject(Level $level, Vector3 $pos){
$level->setBlock(new Vector3($x, $pos->y - 1, $z), new DirtBlock());
$level->setBlock(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock());
$this->totalHeight += mt_rand(-1, 3);
$this->leavesHeight += mt_rand(0, 1);
for($yy = ($this->totalHeight - $this->leavesHeight); $yy < ($this->totalHeight + 1); ++$yy){