better custom packet handling

This commit is contained in:
Shoghi Cervantes Pueyo 2012-11-25 20:27:33 +01:00
parent 95b78a90ac
commit 0205880f99
8 changed files with 62 additions and 24 deletions

View file

@ -114,7 +114,7 @@ class PocketMinecraftClient{
$serverID = $data[1];
$this->send(0x84, array(
$this->counter[0],
0x40,
0x00,
array(
"id" => 0x09,
"clientID" => $this->clientID,
@ -132,7 +132,7 @@ class PocketMinecraftClient{
case 0x00:
$this->send(0x84, array(
$this->counter[0],
0x40,
0x00,
array(
"id" => 0x00,
"payload" => $data["payload"],
@ -143,7 +143,7 @@ class PocketMinecraftClient{
case 0x10:
$this->send(0x84, array(
$this->counter[0],
0x40,
0x00,
array(
"id" => 0x13,
"port" => 19132,
@ -154,7 +154,7 @@ class PocketMinecraftClient{
++$this->counter[0];
$this->send(0x84, array(
$this->counter[0],
0x40,
0x00,
array(
"id" => 0x82,
"username" => $this->username,