mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Added flowers placement
This commit is contained in:
parent
d1610ce7a1
commit
a9c7a6642e
3 changed files with 20 additions and 42 deletions
|
|
@ -30,5 +30,14 @@ class DandelionBlock extends FlowableBlock{
|
|||
parent::__construct(DANDELION, 0, "Dandelion");
|
||||
$this->isFlowable = true;
|
||||
}
|
||||
|
||||
public function place(BlockAPI $level, Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($block->inWorld === true){
|
||||
$down = $level->getBlockFace($block, 0);
|
||||
if($down->getID() === 2 or $down->getID() === 3 or $down->getID() === 60){
|
||||
$level->setBlock($block, $this->id, $this->getMetadata());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue