mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added harvest level properties to applicable blocks
this fixes block-breaking animations with wrong tools, and also finally resolves the long-standing hierarchy problem in Stair.
This commit is contained in:
@ -429,9 +429,13 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
* @return Item[]
|
||||
*/
|
||||
public function getDrops(Item $item) : array{
|
||||
return [
|
||||
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
|
||||
];
|
||||
if($this->canBeBrokenWith($item)){
|
||||
return [
|
||||
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user