Block: improved accuracy of isFullCube()

This commit is contained in:
Dylan K. Taylor 2021-02-04 23:10:13 +00:00
parent 169650dc5b
commit 6ccfe21d57
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -585,7 +585,7 @@ class Block{
public function isFullCube() : bool{
$bb = $this->getCollisionBoxes();
return count($bb) === 1 and $bb[0]->getAverageEdgeLength() >= 1; //TODO: average length 1 != cube
return count($bb) === 1 and $bb[0]->getAverageEdgeLength() >= 1 and $bb[0]->isCube();
}
public function calculateIntercept(Vector3 $pos1, Vector3 $pos2) : ?RayTraceResult{