mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Added Item->getBlockToolType()
This commit is contained in:
@ -28,6 +28,7 @@ namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\BlockToolType;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\item\enchantment\Enchantment;
|
||||
use pocketmine\level\Level;
|
||||
@ -741,6 +742,16 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns what type of block-breaking tool this is. Blocks requiring the same tool type as the item will break
|
||||
* faster (except for blocks requiring no tool, which break at the same speed regardless of the tool used)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getBlockToolType() : int{
|
||||
return BlockToolType::TYPE_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum amount of damage this item can take before it breaks.
|
||||
*
|
||||
|
Reference in New Issue
Block a user