Clean up item handling of blocks

This commit is contained in:
Dylan K. Taylor
2018-09-23 14:21:37 +01:00
parent ed1c511c3c
commit 1427da0aeb
3 changed files with 10 additions and 23 deletions

View File

@ -83,20 +83,12 @@ class Skull extends Flowable{
return false;
}
private function getItem() : Item{
public function getItem() : Item{
$tile = $this->level->getTile($this);
return ItemFactory::get(Item::SKULL, $tile instanceof TileSkull ? $tile->getType() : 0);
}
public function getDropsForCompatibleTool(Item $item) : array{
return [$this->getItem()];
}
public function isAffectedBySilkTouch() : bool{
return false;
}
public function getPickedItem() : Item{
return $this->getItem();
}
}