Plant drop fix

This commit is contained in:
ArkQuark 2022-05-05 19:24:27 +03:00
parent d3a627c977
commit 923dffa3cb
14 changed files with 15 additions and 13 deletions

View file

@ -36,6 +36,8 @@ class TallGrassBlock extends FlowableBlock{
if($type === BLOCK_UPDATE_NORMAL){
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
$this->level->setBlock($this, new AirBlock(), false, false, true);
$random = mt_rand(0,3);
if($random == 3) ServerAPI::request()->api->entity->drop(new Position($this->x + 0.5, $this->y, $this->z + 0.5, $this->level), BlockAPI::getItem(WHEAT_SEEDS));
return BLOCK_UPDATE_NORMAL;
}
}