diff --git a/src/pocketmine/block/Block.php b/src/pocketmine/block/Block.php index f4b7bf282..07dcc69af 100644 --- a/src/pocketmine/block/Block.php +++ b/src/pocketmine/block/Block.php @@ -196,7 +196,13 @@ class Block extends Position implements BlockIds, Metadatable{ } public function canBeBrokenWith(Item $item) : bool{ - return $this->getHardness() !== -1; + if($this->getHardness() < 0){ + return false; + } + + $toolType = $this->getToolType(); + return $toolType === BlockToolType::TYPE_NONE or ($toolType & $item->getBlockToolType()) !== 0; + //TODO: check tool harvest level (tier) } /**