mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added new EntityData Packet
This commit is contained in:
parent
f14c5ec90c
commit
3c348f2e22
2 changed files with 14 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue