Get rid of Block->canPassThrough()

This is only implemented in 1 place where the collision box should just be zero anyway, so there's no point this existing.

There's a lot of other blocks which should have bounding boxes without collision boxes as well, but that's outside the scope of this commit.
This commit is contained in:
Dylan K. Taylor
2018-09-23 17:05:03 +01:00
parent 3eca64e893
commit c501c740a1
3 changed files with 9 additions and 15 deletions

View File

@ -413,10 +413,6 @@ class Block extends Position implements BlockIds, Metadatable{
return false;
}
public function canPassThrough() : bool{
return false;
}
/**
* Returns whether entities can climb up this block.
* @return bool

View File

@ -78,10 +78,6 @@ class Vine extends Flowable{
return 0.2;
}
public function canPassThrough() : bool{
return true;
}
public function hasEntityCollision() : bool{
return true;
}
@ -150,6 +146,10 @@ class Vine extends Flowable{
return new AxisAlignedBB($minX, $minY, $minZ, $maxX, 1, $maxZ);
}
protected function recalculateCollisionBoxes() : array{
return [];
}
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
if(!$blockClicked->isSolid() or Facing::axis($face) === Facing::AXIS_Y){
return false;