mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Move block registration to its own class
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user