use pocketmine\network\mcpe\handler\PacketHandler; class NetworkChunkPublisherUpdatePacket extends DataPacket implements ClientboundPacket{ public const NETWORK_ID = ProtocolInfo::NETWORK_CHUNK_PUBLISHER_UPDATE_PACKET; /** @var int */ public $x; /** @var int */ public $y; /** @var int */ public $z; /** @var int */ public $radius; public static function create(int $x, int $y, int $z, int $blockRadius) : self{ $result = new self; $result->x = $x; $result->y = $y; $result->z = $z; $result->radius = $blockRadius; return $result; } protected function decodePayload() : void{ $this->getSignedBlockPosition($this->x, $this->y, $this->z); $this->radius = $this->getUnsignedVarInt(); } protected function encodePayload() : void{ $this->putSignedBlockPosition($this->x, $this->y, $this->z); $this->putUnsignedVarInt($this->radius); } public function handle(PacketHandler $handler) : bool{ return $handler->handleNetworkChunkPublisherUpdate($this); } }