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

@ -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)