13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol\types\inventory\stackrequest;
18use pocketmine\network\mcpe\protocol\types\GetTypeIdFromConstTrait;
21 use GetTypeIdFromConstTrait;
23 public const ID = ItemStackRequestActionType::MINE_BLOCK;
25 public function __construct(
26 private int $hotbarSlot,
27 private int $predictedDurability,
31 public function getHotbarSlot() :
int{
return $this->hotbarSlot; }
33 public function getPredictedDurability() :
int{
return $this->predictedDurability; }
35 public function getStackId() :
int{
return $this->stackId; }
41 return new self($hotbarSlot, $predictedDurability, $stackId);
46 $out->
putVarInt($this->predictedDurability);
readItemStackNetIdVariant()
writeItemStackNetIdVariant(int $id)