Changed Block->getDrops() to return Item[]

This commit is contained in:
Dylan K. Taylor
2017-08-18 11:21:33 +01:00
parent c8ed2406d7
commit d8f0dd6db8
94 changed files with 314 additions and 373 deletions

View File

@ -28,7 +28,7 @@ use pocketmine\item\Tool;
class NetherBrick extends Solid{
protected $id = self::NETHER_BRICK;
protected $id = self::NETHER_BRICK_BLOCK;
public function __construct(int $meta = 0){
$this->meta = $meta;
@ -46,13 +46,11 @@ class NetherBrick extends Solid{
return 2;
}
public function getDrops(Item $item){
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
[Item::NETHER_BRICK, 0, 1],
];
}else{
return [];
return parent::getDrops($item);
}
return [];
}
}