cleanup block dual bounding box clusterfuck

"bounding box" serves no tangible purpose, only collision boxes do right now.
This commit is contained in:
Dylan K. Taylor
2019-08-15 17:23:55 +01:00
parent d58339b2fd
commit 4898a35613
40 changed files with 202 additions and 157 deletions

View File

@ -53,9 +53,12 @@ class Chest extends Transparent{
return 0b111;
}
protected function recalculateBoundingBox() : ?AxisAlignedBB{
/**
* @return AxisAlignedBB[]
*/
protected function recalculateCollisionBoxes() : array{
//these are slightly bigger than in PC
return AxisAlignedBB::one()->contract(0.025, 0, 0.025)->trim(Facing::UP, 0.05);
return [AxisAlignedBB::one()->contract(0.025, 0, 0.025)->trim(Facing::UP, 0.05)];
}
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{