diff --git a/src/pocketmine/item/Bow.php b/src/pocketmine/item/Bow.php index 20051c3b96..ab45bc4d56 100644 --- a/src/pocketmine/item/Bow.php +++ b/src/pocketmine/item/Bow.php @@ -33,4 +33,7 @@ class Bow extends Tool{ return 200; } + public function getMaxDurability(){ + return 385; + } } \ No newline at end of file diff --git a/src/pocketmine/item/FlintSteel.php b/src/pocketmine/item/FlintSteel.php index 33686758ac..b123351a6c 100644 --- a/src/pocketmine/item/FlintSteel.php +++ b/src/pocketmine/item/FlintSteel.php @@ -52,4 +52,8 @@ class FlintSteel extends Tool{ return false; } + + public function getMaxDurability(){ + return 65; + } } \ No newline at end of file diff --git a/src/pocketmine/item/Shears.php b/src/pocketmine/item/Shears.php index 7c740484f2..aa053644a1 100644 --- a/src/pocketmine/item/Shears.php +++ b/src/pocketmine/item/Shears.php @@ -28,4 +28,12 @@ class Shears extends Tool{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::SHEARS, $meta, $count, "Shears"); } + + public function getMaxDurability(){ + return 239; + } + + public function isShears(){ + return true; + } } \ No newline at end of file diff --git a/src/pocketmine/item/Tool.php b/src/pocketmine/item/Tool.php index c1621bbb01..8172a5daae 100644 --- a/src/pocketmine/item/Tool.php +++ b/src/pocketmine/item/Tool.php @@ -97,10 +97,7 @@ abstract class Tool extends Item{ Tool::TIER_WOODEN => 60, Tool::TIER_STONE => 132, Tool::TIER_IRON => 251, - Tool::TIER_DIAMOND => 1562, - self::FLINT_STEEL => 65, - self::SHEARS => 239, - self::BOW => 385, + Tool::TIER_DIAMOND => 1562 ]; if(($type = $this->isPickaxe()) === false){ @@ -123,31 +120,7 @@ abstract class Tool extends Item{ return $tag !== null and $tag->getValue() > 0; } - public function isPickaxe(){ - return false; - } - - public function isAxe(){ - return false; - } - - public function isSword(){ - return false; - } - - public function isShovel(){ - return false; - } - - public function isHoe(){ - return false; - } - - public function isShears(){ - return ($this->id === self::SHEARS); - } - public function isTool(){ - return ($this->id === self::FLINT_STEEL or $this->id === self::SHEARS or $this->id === self::BOW or $this->isPickaxe() !== false or $this->isAxe() !== false or $this->isShovel() !== false or $this->isSword() !== false); + return true; } } \ No newline at end of file