diff --git a/src/network/CustomPacketHandler.php b/src/network/CustomPacketHandler.php index 359485cb8..d06232e59 100644 --- a/src/network/CustomPacketHandler.php +++ b/src/network/CustomPacketHandler.php @@ -834,6 +834,19 @@ class CustomPacketHandler{ $this->raw .= Utils::writeInt($this->data["flags"]); } 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: if($this->c === false){ console("[DEBUG] Received unknown Data Packet ID 0x".dechex($pid), true, true, 2); diff --git a/src/network/ProtocolInfo.php b/src/network/ProtocolInfo.php index a08afdd94..d95c3e01b 100644 --- a/src/network/ProtocolInfo.php +++ b/src/network/ProtocolInfo.php @@ -166,8 +166,8 @@ class Protocol{ MC_CONTAINER_SET_SLOT => "Set Container Slot", MC_CLIENT_MESSAGE => "Client Message", - //MC_SIGN_UPDATE => "Sign Update", MC_ADVENTURE_SETTINGS => "Adventure Settings", + MC_ENTITY_DATA => "Entity Data", ); public static $packetName = array(