mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-26 04:43:45 +00:00
Block: improved accuracy of isFullCube()
This commit is contained in:
parent
169650dc5b
commit
6ccfe21d57
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user