Move block registration to its own class

This commit is contained in:
Dylan K. Taylor
2017-08-20 18:05:01 +01:00
committed by GitHub
parent 9451dd361e
commit 02f42eba48
62 changed files with 560 additions and 482 deletions

View File

@ -24,10 +24,11 @@ declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
class Carrot extends Food{
public function __construct($meta = 0, $count = 1){
$this->block = Block::get(Block::CARROT_BLOCK);
$this->block = BlockFactory::get(Block::CARROT_BLOCK);
parent::__construct(self::CARROT, $meta, $count, "Carrot");
}