mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
cleanup block dual bounding box clusterfuck
"bounding box" serves no tangible purpose, only collision boxes do right now.
This commit is contained in:
@ -47,19 +47,9 @@ class Fence extends Transparent{
|
||||
}
|
||||
}
|
||||
|
||||
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||
$width = 0.5 - $this->getThickness() / 2;
|
||||
|
||||
$bb = AxisAlignedBB::one()
|
||||
->extend(Facing::UP, 0.5);
|
||||
foreach(Facing::HORIZONTAL as $facing){
|
||||
if(!isset($this->connections[$facing])){
|
||||
$bb->trim($facing, $width);
|
||||
}
|
||||
}
|
||||
return $bb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return AxisAlignedBB[]
|
||||
*/
|
||||
protected function recalculateCollisionBoxes() : array{
|
||||
$inset = 0.5 - $this->getThickness() / 2;
|
||||
|
||||
|
Reference in New Issue
Block a user