mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Block: added getDropsForIncompatibleTool()
This commit is contained in:
@ -33,12 +33,10 @@ class DoubleTallGrass extends DoublePlant{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($this->top and !$this->breakInfo->isToolCompatible($item) and mt_rand(0, 7) === 0){
|
||||
return [
|
||||
VanillaItems::WHEAT_SEEDS()
|
||||
];
|
||||
public function getDropsForIncompatibleTool(Item $item) : array{
|
||||
if($this->top and mt_rand(0, 7) === 0){
|
||||
return [VanillaItems::WHEAT_SEEDS()];
|
||||
}
|
||||
return parent::getDrops($item);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user