Fixed Packet of Death

This commit is contained in:
Shoghi Cervantes 2013-11-26 17:23:45 +01:00
parent 5ad72b4f49
commit bd0d708274
4 changed files with 18 additions and 7 deletions

View file

@ -65,6 +65,9 @@ class MinecraftInterface{
if($len === false){
return $pk;
}
echo "received packet [".strtoupper(bin2hex(Utils::writeInt(crc32($buf))))."]".PHP_EOL;
global $lastPacketSent;
$lastPacketSent = bin2hex($buf);
$this->bandwidth[0] += $len;
$this->parsePacket($buf, $source, $port);
return ($pk !== false ? $pk : $this->popPacket());