mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Item factory refactor and added capability to register custom items
This commit is contained in:
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\item\Tool;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\math\Vector3;
|
||||
@ -66,7 +67,7 @@ class RedstoneOre extends Solid{
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isPickaxe() >= Tool::TIER_IRON){
|
||||
return [
|
||||
Item::get(Item::REDSTONE_DUST, 0, mt_rand(4, 5))
|
||||
ItemFactory::get(Item::REDSTONE_DUST, 0, mt_rand(4, 5))
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user