20 public function __construct(
22 private int $hotbarSlot,
24 private int $itemStackId,
25 private string $customName,
26 private string $filteredCustomName,
27 private int $durabilityCorrection
30 public function getSlot() :
int{
return $this->slot; }
32 public function getHotbarSlot() :
int{
return $this->hotbarSlot; }
34 public function getCount() :
int{
return $this->count; }
36 public function getItemStackId() :
int{
return $this->itemStackId; }
38 public function getCustomName() :
string{
return $this->customName; }
40 public function getFilteredCustomName() :
string{
return $this->filteredCustomName; }
42 public function getDurabilityCorrection() :
int{
return $this->durabilityCorrection; }
48 $itemStackId = $in->readServerItemStackId();
52 return new self($slot, $hotbarSlot, $count, $itemStackId, $customName, $filteredCustomName, $durabilityCorrection);
56 $out->putByte($this->slot);
57 $out->putByte($this->hotbarSlot);
58 $out->putByte($this->count);
59 $out->writeServerItemStackId($this->itemStackId);
60 $out->putString($this->customName);
61 $out->putString($this->filteredCustomName);
62 $out->
putVarInt($this->durabilityCorrection);