mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 08:56:15 +00:00
Item factory refactor and added capability to register custom items
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\entity;
|
||||
use pocketmine\event\entity\EntityDamageByEntityEvent;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\item\Item as ItemItem;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\AddEntityPacket;
|
||||
use pocketmine\network\mcpe\protocol\EntityEventPacket;
|
||||
@ -147,7 +148,7 @@ class Squid extends WaterAnimal{
|
||||
|
||||
public function getDrops() : array{
|
||||
return [
|
||||
ItemItem::get(ItemItem::DYE, 0, mt_rand(1, 3))
|
||||
ItemFactory::get(ItemItem::DYE, 0, mt_rand(1, 3))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user