mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Thin: use bounding box instead of collision boxes
This commit is contained in:
parent
5d56030afa
commit
cea146e335
@ -100,11 +100,7 @@ abstract class Thin extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: currently there's no proper way to tell if a block is a full-block, so we check the bounding box size
|
//FIXME: currently there's no proper way to tell if a block is a full-block, so we check the bounding box size
|
||||||
$bbs = $block->getCollisionBoxes();
|
$bb = $block->getBoundingBox();
|
||||||
if(count($bbs) === 1){
|
return $bb !== null and $bb->getAverageEdgeLength() >= 1;
|
||||||
return $bbs[0]->getAverageEdgeLength() >= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user