mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 00:29:54 +00:00
Fixed Tree spawning
This commit is contained in:
parent
d147caa913
commit
475419b693
@ -37,7 +37,7 @@ class PineTreeObject extends TreeObject{
|
|||||||
public function canPlaceObject(LevelAPI $level, $x, $y, $z){
|
public function canPlaceObject(LevelAPI $level, $x, $y, $z){
|
||||||
$this->findRandomLeavesSize();
|
$this->findRandomLeavesSize();
|
||||||
$checkRadius = 0;
|
$checkRadius = 0;
|
||||||
for($yy = 0; $yy < ($this->totalHeight + 2); ++$yy) {
|
for($yy = 0; $yy < $this->totalHeight; ++$yy) {
|
||||||
if($yy === $this->leavesSizeY) {
|
if($yy === $this->leavesSizeY) {
|
||||||
$checkRadius = $this->leavesAbsoluteMaxRadius;
|
$checkRadius = $this->leavesAbsoluteMaxRadius;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class TreeObject{
|
|||||||
public static function growTree(LevelAPI $level, $block, $type){
|
public static function growTree(LevelAPI $level, $block, $type){
|
||||||
switch($type){
|
switch($type){
|
||||||
case Sapling::SPRUCE:
|
case Sapling::SPRUCE:
|
||||||
if(mt_rand(0,1) == 2){
|
if(mt_rand(0,1) == 1){
|
||||||
$tree = new SpruceTreeObject();
|
$tree = new SpruceTreeObject();
|
||||||
}else{
|
}else{
|
||||||
$tree = new PineTreeObject();
|
$tree = new PineTreeObject();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user