Refactored entity IDs in packets for consistency and to clarify on types

This commit is contained in:
Dylan K. Taylor
2017-06-05 15:41:27 +01:00
parent 51d510aa4f
commit 54453d0b0a
21 changed files with 58 additions and 58 deletions

View File

@ -834,7 +834,7 @@ abstract class Entity extends Location implements Metadatable{
public function sendPotionEffects(Player $player){
foreach($this->effects as $effect){
$pk = new MobEffectPacket();
$pk->eid = $this->id;
$pk->entityRuntimeId = $this->id;
$pk->effectId = $effect->getId();
$pk->amplifier = $effect->getAmplifier();
$pk->particles = $effect->isVisible();
@ -855,7 +855,7 @@ abstract class Entity extends Location implements Metadatable{
}
$pk = new SetEntityDataPacket();
$pk->eid = $this->getId();
$pk->entityRuntimeId = $this->getId();
$pk->metadata = $data === null ? $this->dataProperties : $data;
foreach($player as $p){
@ -878,7 +878,7 @@ abstract class Entity extends Location implements Metadatable{
if(isset($this->hasSpawned[$player->getLoaderId()])){
if($send){
$pk = new RemoveEntityPacket();
$pk->eid = $this->id;
$pk->entityUniqueId = $this->id;
$player->dataPacket($pk);
}
unset($this->hasSpawned[$player->getLoaderId()]);