25    use GetTypeIdFromConstTrait;
 
   27    public const ID = ItemStackRequestActionType::SWAP;
 
   29    public function __construct(
 
   38    public static function read(ByteBufferReader $in) : 
self{
 
   39        $slot1 = ItemStackRequestSlotInfo::read($in);
 
   40        $slot2 = ItemStackRequestSlotInfo::read($in);
 
   41        return new self($slot1, $slot2);
 
   44    public function write(ByteBufferWriter $out) : 
void{
 
   45        $this->slot1->write($out);
 
   46        $this->slot2->write($out);