Block: Use parent::place() instead of setBlock() directly

This commit is contained in:
Dylan K. Taylor
2018-09-12 20:07:39 +01:00
parent 54342ab0ce
commit c0962a47be
45 changed files with 93 additions and 134 deletions

View File

@ -60,10 +60,12 @@ class Skull extends Flowable{
}
$this->meta = $face;
$this->getLevel()->setBlock($blockReplace, $this, true);
Tile::createTile(Tile::SKULL, $this->getLevel(), TileSkull::createNBT($this, $face, $item, $player));
if(parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player)){
Tile::createTile(Tile::SKULL, $this->getLevel(), TileSkull::createNBT($this, $face, $item, $player));
return true;
}
return true;
return false;
}
public function getDropsForCompatibleTool(Item $item) : array{