mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Refactored entity IDs in packets for consistency and to clarify on types
This commit is contained in:
@ -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()]);
|
||||
|
Reference in New Issue
Block a user