Block: Migrated all trivial drops code to getDropsForCompatibleTool()

getDrops() should now be overridden only for special cases. There are some non-trivial overrides left that are going to need some extra work to clean up.
This commit is contained in:
Dylan K. Taylor
2017-12-13 12:49:58 +00:00
parent 8c47a338df
commit 56f1a6ba37
34 changed files with 38 additions and 36 deletions

View File

@ -46,14 +46,14 @@ class Gravel extends Fallable{
return BlockToolType::TYPE_SHOVEL;
}
public function getDrops(Item $item) : array{
public function getDropsForCompatibleTool(Item $item) : array{
if(mt_rand(1, 10) === 1){
return [
ItemFactory::get(Item::FLINT, 0, 1)
];
}
return parent::getDrops($item);
return parent::getDropsForCompatibleTool($item);
}
}