Explosion: fixed ray trace getting stuck on a block when it encounters an empty subchunk

this might have caused unexpected behaviour in large caves.
This commit is contained in:
Dylan K. Taylor 2019-12-13 18:07:59 +00:00
parent 9e1f6a2486
commit 95c32d26df

View File

@ -123,6 +123,10 @@ class Explosion{
$vBlock->y = $pointerY >= $y ? $y : $y - 1;
$vBlock->z = $pointerZ >= $z ? $z : $z - 1;
$pointerX += $vector->x;
$pointerY += $vector->y;
$pointerZ += $vector->z;
if(!$this->subChunkHandler->moveTo($vBlock->x, $vBlock->y, $vBlock->z)){
continue;
}
@ -137,10 +141,6 @@ class Explosion{
}
}
}
$pointerX += $vector->x;
$pointerY += $vector->y;
$pointerZ += $vector->z;
}
}
}