mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
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:
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user