GroundCover: drop useless variable in calculating startY

This commit is contained in:
Dylan K. Taylor 2020-02-06 14:26:03 +00:00
parent 1bdc61dd5f
commit 812424a619

View File

@ -47,13 +47,13 @@ class GroundCover extends Populator{
}
$column = $chunk->getBlockIdColumn($x, $z);
$y = 127;
for(; $y > 0; --$y){
if($column[$y] !== "\x00" and !BlockFactory::get(ord($column[$y]))->isTransparent()){
$startY = 127;
for(; $startY > 0; --$startY){
if($column[$startY] !== "\x00" and !BlockFactory::get(ord($column[$startY]))->isTransparent()){
break;
}
}
$startY = min(127, $y + $diffY);
$startY = min(127, $startY + $diffY);
$endY = $startY - count($cover);
for($y = $startY; $y > $endY and $y >= 0; --$y){
$b = $cover[$startY - $y];