Shears: fixed always-false hardness check

thanks PHPStan
This commit is contained in:
Dylan K. Taylor 2019-10-21 15:21:22 +01:00
parent 7d5c3c9b46
commit bb05cfb36c

View File

@ -48,7 +48,7 @@ class Shears extends Tool{
}
public function onDestroyBlock(Block $block) : bool{
if($block->getHardness() === 0 or $block->isCompatibleWithTool($this)){
if($block->getHardness() === 0.0 or $block->isCompatibleWithTool($this)){
return $this->applyDamage(1);
}
return false;