mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Changed Block->getDrops() to return Item[]
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
@ -49,13 +50,13 @@ class NetherBrickFence extends Transparent{
|
||||
return ($block instanceof NetherBrickFence) or ($block->isSolid() and !$block->isTransparent());
|
||||
}
|
||||
|
||||
public function getDrops(Item $item){
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= Tool::TIER_WOODEN){
|
||||
return [
|
||||
[$this->id, $this->meta, 1],
|
||||
];
|
||||
}else{
|
||||
return [];
|
||||
return parent::getDrops($item);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
//TODO: fix bounding boxes
|
||||
}
|
||||
|
Reference in New Issue
Block a user