Fixed double plants and beds sometimes dropping in creative

This commit is contained in:
Dylan K. Taylor
2017-08-21 19:25:04 +01:00
parent 592ce3c9e9
commit b8ade18888
8 changed files with 26 additions and 20 deletions

View File

@ -161,11 +161,12 @@ class Block extends Position implements BlockIds, Metadatable{
/**
* Do the actions needed so the block is broken with the Item
*
* @param Item $item
* @param Item $item
* @param Player|null $player
*
* @return bool
*/
public function onBreak(Item $item) : bool{
public function onBreak(Item $item, Player $player = null) : bool{
return $this->getLevel()->setBlock($this, BlockFactory::get(Block::AIR), true, true);
}