Player: remove dataPacket() and directDataPacket()

I considered renaming sendDataPacket() to dataPacket() to reduce the BC breaks, but the parameter set has changed, which might cause astonishing behaviour, so it's better to break it in a loud way. Also, this has a clearer name.
This commit is contained in:
Dylan K. Taylor
2018-07-22 12:04:53 +01:00
parent 85105ed066
commit c1843ac2d4
14 changed files with 43 additions and 61 deletions

View File

@ -1930,7 +1930,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$pk->attributes = $this->attributeMap->getAll();
$pk->metadata = $this->propertyManager->getAll();
$player->dataPacket($pk);
$player->sendDataPacket($pk);
}
/**
@ -1971,7 +1971,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
if($send){
$pk = new RemoveEntityPacket();
$pk->entityUniqueId = $this->id;
$player->dataPacket($pk);
$player->sendDataPacket($pk);
}
unset($this->hasSpawned[$player->getLoaderId()]);
}
@ -2092,11 +2092,11 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
if($p === $this){
continue;
}
$p->dataPacket(clone $pk);
$p->sendDataPacket(clone $pk);
}
if($this instanceof Player){
$this->dataPacket($pk);
$this->sendDataPacket($pk);
}
}