mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Fixed #257
This commit is contained in:
parent
b48f486620
commit
f485124190
2 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ class PineTreeObject extends TreeObject{
|
||||||
if($this->leavesSizeY === -1 or $this->leavesAbsoluteMaxRadius === -1) {
|
if($this->leavesSizeY === -1 or $this->leavesAbsoluteMaxRadius === -1) {
|
||||||
$this->findRandomLeavesSize();
|
$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);
|
$leavesRadius = mt_rand(0,2);
|
||||||
$leavesMaxRadius = 1;
|
$leavesMaxRadius = 1;
|
||||||
$leavesBottomY = $this->totalHeight - $this->leavesSizeY;
|
$leavesBottomY = $this->totalHeight - $this->leavesSizeY;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class SmallTreeObject extends TreeObject{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function placeObject(Level $level, Vector3 $pos){
|
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->totalHeight += mt_rand(-1, 3);
|
||||||
$this->leavesHeight += mt_rand(0, 1);
|
$this->leavesHeight += mt_rand(0, 1);
|
||||||
for($yy = ($this->totalHeight - $this->leavesHeight); $yy < ($this->totalHeight + 1); ++$yy){
|
for($yy = ($this->totalHeight - $this->leavesHeight); $yy < ($this->totalHeight + 1); ++$yy){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue