Cleaned up EntityEventPacket handling

This commit is contained in:
Dylan K. Taylor
2017-11-04 18:31:35 +00:00
parent ddb7fd12f2
commit a66a757f56
4 changed files with 14 additions and 16 deletions

View File

@ -64,10 +64,7 @@ class Squid extends WaterAnimal{
$this->swimDirection = (new Vector3($this->x - $e->x, $this->y - $e->y, $this->z - $e->z))->normalize();
}
$pk = new EntityEventPacket();
$pk->entityRuntimeId = $this->getId();
$pk->event = EntityEventPacket::SQUID_INK_CLOUD;
$this->server->broadcastPacket($this->hasSpawned, $pk);
$this->broadcastEntityEvent(EntityEventPacket::SQUID_INK_CLOUD);
}
}