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:
@ -42,6 +42,10 @@ class Obsidian extends Solid{
|
||||
return BlockToolType::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
public function getToolHarvestLevel() : int{
|
||||
return TieredTool::TIER_DIAMOND;
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
return 35; //50 in PC
|
||||
}
|
||||
@ -49,12 +53,4 @@ class Obsidian extends Solid{
|
||||
public function getBlastResistance() : float{
|
||||
return 6000;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= TieredTool::TIER_DIAMOND){
|
||||
return parent::getDrops($item);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user