24 use GetTypeIdFromConstTrait;
26 public const ID = ItemStackRequestActionType::DROP;
28 public function __construct(
31 private bool $randomly
34 public function getCount() :
int{
return $this->count; }
38 public function isRandomly() :
bool{
return $this->randomly; }
42 $source = ItemStackRequestSlotInfo::read($in);
44 return new self($count, $source, $random);
48 $out->putByte($this->count);
49 $this->source->write($out);
50 $out->putBool($this->randomly);