mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 18:11:52 +00:00
Fixed #257
This commit is contained in:
parent
b48f486620
commit
f485124190
@ -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…
x
Reference in New Issue
Block a user