diff --git a/src/world/generator/object/tree/PineTreeObject.php b/src/world/generator/object/tree/PineTreeObject.php index 7fd245ad9..bf58ef6f3 100644 --- a/src/world/generator/object/tree/PineTreeObject.php +++ b/src/world/generator/object/tree/PineTreeObject.php @@ -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; diff --git a/src/world/generator/object/tree/SmallTreeObject.php b/src/world/generator/object/tree/SmallTreeObject.php index e013193d0..28c1141e8 100644 --- a/src/world/generator/object/tree/SmallTreeObject.php +++ b/src/world/generator/object/tree/SmallTreeObject.php @@ -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){