13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol\types\inventory\stackrequest;
19trait DisappearStackRequestActionTrait{
20 final public function __construct(
22 private ItemStackRequestSlotInfo $source
25 final public function getCount() : int{ return $this->count; }
27 final public function getSource() : ItemStackRequestSlotInfo{ return $this->source; }
29 public static function read(PacketSerializer $in) : self{
30 $count = $in->getByte();
31 $source = ItemStackRequestSlotInfo::read($in);
32 return new self($count, $source);
35 public function write(PacketSerializer $out) : void{
36 $out->putByte($this->count);
37 $this->source->write($out);