mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Added Item->getBlockToolType()
This commit is contained in:
@ -23,12 +23,18 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\block\BlockToolType;
|
||||
|
||||
class Sword extends TieredTool{
|
||||
|
||||
public function isSword(){
|
||||
return $this->tier;
|
||||
}
|
||||
|
||||
public function getBlockToolType() : int{
|
||||
return BlockToolType::TYPE_SWORD;
|
||||
}
|
||||
|
||||
public function getAttackPoints() : int{
|
||||
return self::getBaseDamageFromTier($this->tier);
|
||||
}
|
||||
|
Reference in New Issue
Block a user