avoid type juggling in conditions, always use explicit boolean conditions

This commit is contained in:
Dylan K. Taylor
2020-02-05 15:44:06 +00:00
parent b96bb7d824
commit e5a2cfb65f
17 changed files with 43 additions and 43 deletions

View File

@ -197,7 +197,7 @@ class Vine extends Flowable{
}
public function getDrops(Item $item) : array{
if($item->getBlockToolType() & BlockToolType::TYPE_SHEARS){
if(($item->getBlockToolType() & BlockToolType::TYPE_SHEARS) !== 0){
return $this->getDropsForCompatibleTool($item);
}