mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Changed Block->getDrops() to return Item[]
This commit is contained in:
@ -26,7 +26,6 @@ namespace pocketmine\block;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\Tool;
|
||||
|
||||
//TODO: check orientation
|
||||
class Stonecutter extends Solid{
|
||||
|
||||
protected $id = self::STONECUTTER;
|
||||
@ -43,13 +42,11 @@ class Stonecutter extends Solid{
|
||||
return Tool::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item){
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= Tool::TIER_WOODEN){
|
||||
return [
|
||||
[Item::STONECUTTER, 0, 1],
|
||||
];
|
||||
}else{
|
||||
return [];
|
||||
return parent::getDrops($item);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user