13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
22 public const NETWORK_ID = ProtocolInfo::ITEM_STACK_REQUEST_PACKET;
25 private array $requests;
31 public static function create(array $requests) : self{
33 $result->requests = $requests;
38 public function getRequests() : array{ return $this->requests; }
43 $this->requests[] = ItemStackRequest::read($in);
48 $out->putUnsignedVarInt(count($this->requests));
49 foreach($this->requests as $request){
50 $request->write($out);
55 return $handler->handleItemStackRequest($this);
handle(PacketHandlerInterface $handler)
static create(array $requests)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)