Tree: fixed populator not growing trees any lower than y=2

this would only be a problem for custom generators, but nonetheless...
This commit is contained in:
Dylan K. Taylor 2020-02-05 13:17:09 +00:00
parent 99038c752c
commit 59cf8e95f0

View File

@ -80,7 +80,7 @@ class Tree extends Populator{
}
private function getHighestWorkableBlock(int $x, int $z) : int{
for($y = 127; $y > 0; --$y){
for($y = 127; $y >= 0; --$y){
$b = $this->level->getBlockIdAt($x, $y, $z);
if($b === Block::DIRT or $b === Block::GRASS){
return $y + 1;