mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Item factory refactor and added capability to register custom items
This commit is contained in:
@ -28,6 +28,7 @@ namespace pocketmine\block;
|
||||
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\item\Tool;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\level\MovingObjectPosition;
|
||||
@ -338,7 +339,7 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
*/
|
||||
public function getDrops(Item $item) : array{
|
||||
return [
|
||||
Item::get($this->getItemId(), $this->getDamage() & $this->getVariantBitmask(), 1),
|
||||
ItemFactory::get($this->getItemId(), $this->getDamage() & $this->getVariantBitmask(), 1),
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user