13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::UPDATE_EQUIP_PACKET;
24 public int $windowType;
25 public int $windowSlotCount;
26 public int $actorUniqueId;
34 public static function create(
int $windowId,
int $windowType,
int $windowSlotCount,
int $actorUniqueId,
CacheableNbt $nbt) : self{
36 $result->windowId = $windowId;
37 $result->windowType = $windowType;
38 $result->windowSlotCount = $windowSlotCount;
39 $result->actorUniqueId = $actorUniqueId;
45 $this->windowId = $in->getByte();
46 $this->windowType = $in->
getByte();
47 $this->windowSlotCount = $in->
getVarInt();
49 $this->nbt =
new CacheableNbt($in->getNbtCompoundRoot());
53 $out->putByte($this->windowId);
54 $out->putByte($this->windowType);
56 $out->putActorUniqueId($this->actorUniqueId);
57 $out->put($this->nbt->getEncodedNbt());
61 return $handler->handleUpdateEquip($this);
encodePayload(PacketSerializer $out)
handle(PacketHandlerInterface $handler)
static create(int $windowId, int $windowType, int $windowSlotCount, int $actorUniqueId, CacheableNbt $nbt)
decodePayload(PacketSerializer $in)