13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::PLAYER_TOGGLE_CRAFTER_SLOT_REQUEST_PACKET;
25 private bool $disabled;
32 $result->position = $position;
33 $result->slot = $slot;
34 $result->disabled = $disabled;
38 public function getPosition() :
BlockPosition{ return $this->position; }
40 public function getSlot() : int{ return $this->slot; }
42 public function isDisabled() : bool{ return $this->disabled; }
50 $this->disabled = $in->
getBool();
54 $out->putLInt($this->position->getX());
55 $out->putLInt($this->position->getY());
56 $out->putLInt($this->position->getZ());
57 $out->putByte($this->slot);
58 $out->putBool($this->disabled);
62 return $handler->handlePlayerToggleCrafterSlotRequest($this);
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)
static create(BlockPosition $position, int $slot, bool $disabled)