Block creating and property handling rewrite, part1

This commit is contained in:
Shoghi Cervantes
2014-12-07 01:53:27 +01:00
parent 79236c971c
commit a0d4bff385
138 changed files with 1912 additions and 835 deletions

View File

@ -26,16 +26,24 @@ use pocketmine\Player;
class Dirt extends Solid{
public $isActivable = true;
protected $hardness = 2.5;
protected $id = self::DIRT;
protected $meta = 0;
protected $name = "Dirt";
public function __construct(){
}
public function canBeActivated(){
return true;
}
public function getHardness(){
return 2.5;
}
public function getName(){
return "Dirt";
}
public function onActivate(Item $item, Player $player = null){
if($item->isHoe()){
$item->useOn($this);