Implemented Channeled packet sending

This commit is contained in:
Shoghi Cervantes
2015-04-14 18:24:40 +02:00
parent bb945446b7
commit 0b176b3fe0
29 changed files with 170 additions and 120 deletions

View File

@ -23,6 +23,7 @@ namespace pocketmine\entity;
use pocketmine\nbt\tag\Int;
use pocketmine\network\Network;
use pocketmine\network\protocol\AddEntityPacket;
use pocketmine\Player;
@ -64,7 +65,7 @@ class Villager extends Creature implements NPC, Ageable{
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk->metadata = $this->dataProperties;
$player->dataPacket($pk);
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
parent::spawnTo($player);
}