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