Place/Breaking/Activation logic separated from BlockAPI

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-03 18:55:59 +01:00
parent 6156baab85
commit d9c87161ba
37 changed files with 387 additions and 216 deletions

View file

@ -29,5 +29,15 @@ class WheatBlock extends FlowableBlock{
public function __construct($meta = 0){
parent::__construct(WHEAT, $meta, "Wheat");
}
public function getDrops(Item $item, Player $player){
$drops = array();
if($this->meta >= 0x07){
$drops[] = array(296, 0, 1);
$drops[] = array(295, 0, mt_rand(0, 3));
}else{
$drops[] = array(295, 0, 1);
}
return $drops;
}
}