Leaves can now be silk touched, closes #3714 (#4240)

This commit is contained in:
Jason 2021-06-17 10:37:02 -04:00 committed by GitHub
parent 61c59be299
commit ec6103d61e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,9 +136,9 @@ class Leaves extends Transparent{
return parent::place($tx, $item, $blockReplace, $blockClicked, $face, $clickVector, $player);
}
public function getDrops(Item $item) : array{
public function getDropsForCompatibleTool(Item $item) : array{
if(($item->getBlockToolType() & BlockToolType::SHEARS) !== 0){
return $this->getDropsForCompatibleTool($item);
return parent::getDropsForCompatibleTool($item);
}
$drops = [];
@ -152,6 +152,10 @@ class Leaves extends Transparent{
return $drops;
}
public function isAffectedBySilkTouch() : bool{
return true;
}
public function getFlameEncouragement() : int{
return 30;
}