mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Item factory refactor and added capability to register custom items
This commit is contained in:
@ -27,7 +27,7 @@ namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
use pocketmine\entity\Attribute;
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
use pocketmine\utils\BinaryStream;
|
||||
use pocketmine\utils\Utils;
|
||||
@ -209,7 +209,7 @@ abstract class DataPacket extends BinaryStream{
|
||||
break;
|
||||
case Entity::DATA_TYPE_SLOT:
|
||||
//TODO: change this implementation (use objects)
|
||||
$this->putSlot(Item::get($d[1][0], $d[1][2], $d[1][1])); //ID, damage, count
|
||||
$this->putSlot(ItemFactory::get($d[1][0], $d[1][2], $d[1][1])); //ID, damage, count
|
||||
break;
|
||||
case Entity::DATA_TYPE_POS:
|
||||
//TODO: change this implementation (use objects)
|
||||
|
Reference in New Issue
Block a user