13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
23 public const NETWORK_ID = ProtocolInfo::ITEM_COMPONENT_PACKET;
29 private array $entries;
36 public static function create(array $entries) : self{
38 $result->entries = $entries;
46 public function getEntries() : array{ return $this->entries; }
52 $nbt = $in->getNbtCompoundRoot();
58 $out->putUnsignedVarInt(count($this->entries));
59 foreach($this->entries as $entry){
60 $out->putString($entry->getName());
61 $out->put($entry->getComponentNbt()->getEncodedNbt());
66 return $handler->handleItemComponent($this);
static create(array $entries)
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)