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

@ -62,7 +62,7 @@ class SaplingBlock extends FlowableBlock{
public function onUpdate($type){
if($type === BLOCK_UPDATE_NORMAL){
if($this->getSide(0)->isTransparent === true){ //Replace with common break method
ServerAPI::request()->api->entity->drop($this, BlockAPI::getItem($this->id, $this->getMetadata()));
ServerAPI::request()->api->entity->drop(new Position($this->x + 0.5, $this->y, $this->z + 0.5, $this->level), BlockAPI::getItem($this->id, $this->getMetadata()));
$this->level->setBlock($this, new AirBlock(), false, false, true);
return BLOCK_UPDATE_NORMAL;
}