small fixes

This commit is contained in:
GameHerobrine 2022-10-19 19:02:59 +03:00
parent 7b66cd0250
commit ae8c541452
5 changed files with 23 additions and 11 deletions

View file

@ -36,11 +36,11 @@ class Level{
public function getCubes(AxisAlignedBB $aABB) {
$aABBs = [];
$x0 = floor($aABB->minX);
$x1 = ceil($aABB->maxX + 1.0);
$x1 = ceil($aABB->maxX);
$y0 = floor($aABB->minY);
$y1 = ceil($aABB->maxY + 1.0);
$y1 = ceil($aABB->maxY);
$z0 = floor($aABB->minZ);
$z1 = ceil($aABB->maxZ + 1.0);
$z1 = ceil($aABB->maxZ);
$x0 = $x0 < 0 ? 0 : $x0;
$y0 = $y0 < 0 ? 0 : $y0;
$z0 = $z0 < 0 ? 0 : $z0;