Updated packet structure

This commit is contained in:
Shoghi Cervantes Pueyo 2012-11-27 22:35:47 +01:00
parent 61af6f14b4
commit 82b6eb382d
3 changed files with 17 additions and 12 deletions

View file

@ -82,19 +82,21 @@ class CustomPacketHandler{
break;
case 0x87:
if($this->c === false){
$this->data["seed"] = $this->get(8);
$this->data["unknown1"] = $this->get(4);
$this->data["unknown2"] = $this->get(4);
$this->data["spawnX"] = Utils::readFloat($this->get(4));
$this->data["spawnY"] = Utils::readFloat($this->get(4));
$this->data["spawnZ"] = Utils::readFloat($this->get(4));
$this->data["seed"] = $this->get(4);
$this->data["spawnX"] = Utils::readInt($this->get(4));
$this->data["spawnY"] = Utils::readInt($this->get(4));
$this->data["spawnZ"] = Utils::readInt($this->get(4));
$this->data["x"] = Utils::readFloat($this->get(4));
$this->data["y"] = Utils::readFloat($this->get(4));
$this->data["z"] = Utils::readFloat($this->get(4));
}else{
$this->raw .= $this->data["seed"];
$this->raw .= "\x00\x00\x00\x01\x00\x00\x00\x05";
$this->raw .= "\x43\x00\x80\x00\x42\x82\x00\x00\x43\x00\x80\x00";
/*$this->raw .= Utils::writeFloat($this->data["spawnX"]);
$this->raw .= Utils::writeFloat($this->data["spawnY"]);
$this->raw .= Utils::writeFloat($this->data["spawnZ"]);*/
$this->raw .= Utils::writeInt($this->data["spawnX"]);
$this->raw .= Utils::writeInt($this->data["spawnY"]);
$this->raw .= Utils::writeInt($this->data["spawnZ"]);
$this->raw .= Utils::writeFloat($this->data["x"]);
$this->raw .= Utils::writeFloat($this->data["y"]);
$this->raw .= Utils::writeFloat($this->data["z"]);
}
break;
case 0x09: