From 92524540714798f034cddb21fefced3a5a461f43 Mon Sep 17 00:00:00 2001 From: ipad54 <63200545+ipad54@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:27:58 +0300 Subject: [PATCH] Update outdated PacketBatch documentation. (#249) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e0c5989a..88b155ed 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Assuming you've decrypted and decompressed a Minecraft packet successfully, you' With this library, that's currently done using `PacketBatch`, like so: ```php -foreach(PacketBatchUtils::decodePackets(new BinaryStream($payload), $protocolContext, PacketPool::getInstance()) as $packetObject){ +foreach(PacketBatch::decodePackets(new BinaryStream($payload), PacketPool::getInstance()) as $packetObject){ var_dump($packetObject); //tada } ``` @@ -25,7 +25,7 @@ This is easy: ```php /** @var Packet[] $packets */ $stream = new BinaryStream(); -PacketBatchUtils::encodePackets($stream, $protocolContext, $packets); +PacketBatch::encodePackets($stream, $packets); $batchPayload = $stream->getBuffer(); ```