13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
17use pmmp\encoding\Byte;
18use pmmp\encoding\ByteBufferReader;
19use pmmp\encoding\ByteBufferWriter;
20use pmmp\encoding\VarInt;
23 public const NETWORK_ID = ProtocolInfo::REQUEST_CHUNK_RADIUS_PACKET;
26 public int $maxRadius;
31 public static function create(
int $radius,
int $maxRadius) : self{
33 $result->radius = $radius;
34 $result->maxRadius = $maxRadius;
39 $this->radius = VarInt::readSignedInt($in);
40 $this->maxRadius = Byte::readUnsigned($in);
44 VarInt::writeSignedInt($out, $this->radius);
45 Byte::writeUnsigned($out, $this->maxRadius);
49 return $handler->handleRequestChunkRadius($this);
decodePayload(ByteBufferReader $in)
encodePayload(ByteBufferWriter $out)
static create(int $radius, int $maxRadius)
handle(PacketHandlerInterface $handler)