AddActorPacket: move BC hack to higher level

we shouldn't hack the protocol impl for BC.
This commit is contained in:
Dylan K. Taylor
2020-02-27 17:37:45 +00:00
parent dbaf851be7
commit c19ab97610
2 changed files with 4 additions and 10 deletions

View File

@ -1914,7 +1914,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
protected function sendSpawnPacket(Player $player) : void{
$pk = new AddActorPacket();
$pk->entityRuntimeId = $this->getId();
$pk->type = static::NETWORK_ID;
$pk->type = AddActorPacket::LEGACY_ID_MAP_BC[static::NETWORK_ID];
$pk->position = $this->asVector3();
$pk->motion = $this->getMotion();
$pk->yaw = $this->yaw;