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

@ -50,7 +50,7 @@ class Dirt extends Solid{
public function onActivate(Item $item, Player $player = null) : bool{
if($item->isHoe()){
$item->useOn($this);
$this->getLevel()->setBlock($this, Block::get(Block::FARMLAND, 0), true);
$this->getLevel()->setBlock($this, BlockFactory::get(Block::FARMLAND, 0), true);
return true;
}