diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index 95973a8c2..35e868efc 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -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 diff --git a/src/pocketmine/block/Vine.php b/src/pocketmine/block/Vine.php index 1f0061157..fdfd7cb0c 100644 --- a/src/pocketmine/block/Vine.php +++ b/src/pocketmine/block/Vine.php @@ -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; diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 571f14cef..8d4699965 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1131,7 +1131,7 @@ class Level implements ChunkManager, Metadatable{ for($x = $minX; $x <= $maxX; ++$x){ for($y = $minY; $y <= $maxY; ++$y){ $block = $this->getBlockAt($x, $y, $z); - if(!$block->canPassThrough() and $block->collidesWithBB($bb)){ + if($block->collidesWithBB($bb)){ return [$block]; } } @@ -1142,7 +1142,7 @@ class Level implements ChunkManager, Metadatable{ for($x = $minX; $x <= $maxX; ++$x){ for($y = $minY; $y <= $maxY; ++$y){ $block = $this->getBlockAt($x, $y, $z); - if(!$block->canPassThrough() and $block->collidesWithBB($bb)){ + if($block->collidesWithBB($bb)){ $collides[] = $block; } } @@ -1193,11 +1193,9 @@ class Level implements ChunkManager, Metadatable{ for($x = $minX; $x <= $maxX; ++$x){ for($y = $minY; $y <= $maxY; ++$y){ $block = $this->getBlockAt($x, $y, $z); - if(!$block->canPassThrough()){ - foreach($block->getCollisionBoxes() as $blockBB){ - if($blockBB->intersectsWith($bb)){ - $collides[] = $blockBB; - } + foreach($block->getCollisionBoxes() as $blockBB){ + if($blockBB->intersectsWith($bb)){ + $collides[] = $blockBB; } } }