※New Tools' durability system

fix some tool type
This commit is contained in:
dog194 2016-04-19 13:10:52 +08:00
commit d99134c803
4 changed files with 15 additions and 2 deletions

View file

@ -47,7 +47,7 @@ class Cobweb extends Flowable{
}
public function getToolType(){
return Tool::TYPE_SWORD;
return Tool::TYPE_SHEARS;
}
public function onEntityCollide(Entity $entity){

View file

@ -22,6 +22,7 @@
namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\item\Tool;
use pocketmine\level\Level;
use pocketmine\Player;
@ -79,6 +80,11 @@ class TallGrass extends Flowable{
return false;
}
public function getToolType()
{
return Tool::TYPE_SHEARS;
}
public function getDrops(Item $item) : array {
if(mt_rand(0, 15) === 0){
return [

View file

@ -21,6 +21,8 @@
namespace pocketmine\block;
use pocketmine\item\Tool;
class Tripwire extends Solid {
protected $id = self::TRIPWIRE;
@ -32,4 +34,9 @@ class Tripwire extends Solid {
public function getName() : string {
return "Tripwire";
}
public function getToolType()
{
return Tool::TYPE_SHEARS;
}
}

View file

@ -165,6 +165,6 @@ class Vine extends Transparent{
}
public function getToolType(){
return Tool::TYPE_AXE;
return Tool::TYPE_SHEARS;
}
}