mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
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:
@ -38,7 +38,7 @@ class Potato extends Crops{
|
||||
return "Potato Block";
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
public function getDropsForCompatibleTool(Item $item) : array{
|
||||
return [
|
||||
ItemFactory::get(Item::POTATO, 0, $this->getDamage() >= 0x07 ? mt_rand(1, 4) : 1)
|
||||
];
|
||||
|
Reference in New Issue
Block a user