mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Tilling Dirt & Grass, tall gras growth
This commit is contained in:
parent
a718294a08
commit
fee04cd0d9
6 changed files with 61 additions and 10 deletions
|
|
@ -28,6 +28,14 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
class DirtBlock extends SolidBlock{
|
||||
public function __construct(){
|
||||
parent::__construct(DIRT, 0, "Dirt");
|
||||
$this->isActivable = true;
|
||||
}
|
||||
|
||||
public function onActivate(BlockAPI $level, Item $item, Player $player){
|
||||
if($item->isHoe()){
|
||||
$level->setBlock($this, FARMLAND, 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue