mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
41 lines
1008 B
PHP
41 lines
1008 B
PHP
<?php
|
|
|
|
/*
|
|
|
|
-
|
|
/ \
|
|
/ \
|
|
/ PocketMine \
|
|
/ MP \
|
|
|\ @shoghicp /|
|
|
|. \ / .|
|
|
| .. \ / .. |
|
|
| .. | .. |
|
|
| .. | .. |
|
|
\ | /
|
|
\ | /
|
|
\ | /
|
|
\ | /
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
|
|
*/
|
|
|
|
class DandelionBlock extends FlowableBlock{
|
|
public function __construct(){
|
|
parent::__construct(DANDELION, 0, "Dandelion");
|
|
$this->isFlowable = true;
|
|
}
|
|
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
|
$down = $this->getSide(0);
|
|
if($down->getID() === 2 or $down->getID() === 3 or $down->getID() === 60){
|
|
$this->level->setBlock($block, $this);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
} |