Item factory refactor and added capability to register custom items

This commit is contained in:
Dylan K. Taylor
2017-08-20 19:11:21 +01:00
parent 604d11a8fd
commit 876659cc73
66 changed files with 491 additions and 347 deletions

View File

@ -25,6 +25,7 @@ namespace pocketmine\block;
use pocketmine\event\block\BlockSpreadEvent;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\item\Tool;
use pocketmine\level\generator\object\TallGrass as TallGrassObject;
use pocketmine\level\Level;
@ -54,7 +55,7 @@ class Grass extends Solid{
public function getDrops(Item $item) : array{
return [
Item::get(Item::DIRT, 0, 1),
ItemFactory::get(Item::DIRT, 0, 1),
];
}