mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Plant fix
This commit is contained in:
parent
133f398a42
commit
a8d4797cf2
8 changed files with 31 additions and 15 deletions
|
|
@ -53,12 +53,13 @@ class WheatBlock extends FlowableBlock{
|
|||
|
||||
public function onUpdate($type){
|
||||
if($type === BLOCK_UPDATE_NORMAL){
|
||||
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
|
||||
if($this->getSide(0)->getID() != 60){
|
||||
ServerAPI::request()->api->entity->drop(new Position($this->x + 0.5, $this->y, $this->z + 0.5, $this->level), BlockAPI::getItem(WHEAT_SEEDS, 0, 1));
|
||||
$this->level->setBlock($this, new AirBlock(), false, false, true);
|
||||
return BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
}elseif($type === BLOCK_UPDATE_RANDOM){
|
||||
}
|
||||
elseif($type === BLOCK_UPDATE_RANDOM){
|
||||
if(mt_rand(0, 2) == 1){
|
||||
if($this->meta < 0x07){
|
||||
++$this->meta;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue