fixed setentitylink packet

This commit is contained in:
GameHerobrine 2023-01-29 17:43:14 +03:00
parent 81af4a9b45
commit b959b812cf
3 changed files with 19 additions and 10 deletions

View file

@ -1319,13 +1319,9 @@ class Entity extends Position
public function linkEntity(Entity $e, $type)
{
if($e->isPlayer()){
$pk = new SetEntityLinkPacket();
$pk->rider = $this->eid;
$pk->riding = $type === SetEntityLinkPacket::TYPE_REMOVE ? 0 : $e->eid;
$pk->type = $type;
$e->player->dataPacket($pk);
}
//if($e->isPlayer()){
$this->server->api->dhandle("entity.link", ["rider" => $e->eid, "riding" => $this->eid, "type" => 0]);
//}
}
public function isPlayer()