mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected
This commit is contained in:
@ -39,7 +39,7 @@ class ResourcePackClientResponsePacket extends DataPacket{
|
||||
public $status;
|
||||
public $packIds = [];
|
||||
|
||||
public function decodePayload(){
|
||||
protected function decodePayload(){
|
||||
$this->status = $this->getByte();
|
||||
$entryCount = $this->getLShort();
|
||||
while($entryCount-- > 0){
|
||||
@ -47,7 +47,7 @@ class ResourcePackClientResponsePacket extends DataPacket{
|
||||
}
|
||||
}
|
||||
|
||||
public function encodePayload(){
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->status);
|
||||
$this->putLShort(count($this->packIds));
|
||||
foreach($this->packIds as $id){
|
||||
|
Reference in New Issue
Block a user