mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +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:
@ -43,12 +43,16 @@ class LapisOre extends Solid{
|
||||
return BlockToolType::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
public function getToolHarvestLevel() : int{
|
||||
return TieredTool::TIER_STONE;
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return "Lapis Lazuli Ore";
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= TieredTool::TIER_STONE){
|
||||
if($this->canBeBrokenWith($item)){
|
||||
return [
|
||||
ItemFactory::get(Item::DYE, 4, mt_rand(4, 8))
|
||||
];
|
||||
|
Reference in New Issue
Block a user