mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
Added new EntityData Packet
This commit is contained in:
parent
f14c5ec90c
commit
3c348f2e22
@ -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);
|
||||||
|
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user