Open player's eyes for mobs

This commit is contained in:
ArkQuark 2023-02-21 15:37:42 +03:00
parent b6934024da
commit abe7846bb9
4 changed files with 15 additions and 10 deletions

View file

@ -22,9 +22,9 @@ class AddMobPacket extends RakNetDataPacket{
$this->reset();
$this->putInt($this->eid);
$this->putInt($this->type);
$this->putFloat($this->x);
$this->putFloat($this->y);
$this->putFloat($this->z);
$this->putInt($this->x);
$this->putInt($this->y);
$this->putInt($this->z);
$this->putByte($this->yaw);
$this->putByte($this->pitch);
$this->put(Utils::writeMetadata($this->metadata));

View file

@ -11,17 +11,17 @@ class EntityDataPacket extends RakNetDataPacket{
}
public function decode(){
$this->x = $this->getShort();
$this->x = $this->getInt();
$this->y = $this->getByte();
$this->z = $this->getShort();
$this->z = $this->getInt();
$this->namedtag = $this->get(true);
}
public function encode(){
$this->reset();
$this->putShort($this->x);
$this->putInt($this->x);
$this->putByte($this->y);
$this->putShort($this->z);
$this->putInt($this->z);
$this->put($this->namedtag);
}