Added new EntityData Packet

This commit is contained in:
Shoghi Cervantes 2013-08-26 23:29:32 +02:00
parent f14c5ec90c
commit 3c348f2e22
2 changed files with 14 additions and 1 deletions

View File

@ -834,6 +834,19 @@ class CustomPacketHandler{
$this->raw .= Utils::writeInt($this->data["flags"]); $this->raw .= Utils::writeInt($this->data["flags"]);
} }
break; break;
case MC_ENTITY_DATA:
if($this->c === false){
$this->data["x"] = Utils::readShort($this->get(2));
$this->data["y"] = ord($this->get(1));
$this->data["z"] = Utils::readShort($this->get(2));
$this->data["namedtag"] = $this->get(true);
}else{
$this->raw .= Utils::writeShort($this->data["x"]);
$this->raw .= chr($this->data["y"]);
$this->raw .= Utils::writeShort($this->data["z"]);
$this->raw .= Utils::writeShort($this->data["namedtag"]);
}
break;
default: default:
if($this->c === false){ if($this->c === false){
console("[DEBUG] Received unknown Data Packet ID 0x".dechex($pid), true, true, 2); console("[DEBUG] Received unknown Data Packet ID 0x".dechex($pid), true, true, 2);

View File

@ -166,8 +166,8 @@ class Protocol{
MC_CONTAINER_SET_SLOT => "Set Container Slot", MC_CONTAINER_SET_SLOT => "Set Container Slot",
MC_CLIENT_MESSAGE => "Client Message", MC_CLIENT_MESSAGE => "Client Message",
//MC_SIGN_UPDATE => "Sign Update",
MC_ADVENTURE_SETTINGS => "Adventure Settings", MC_ADVENTURE_SETTINGS => "Adventure Settings",
MC_ENTITY_DATA => "Entity Data",
); );
public static $packetName = array( public static $packetName = array(