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

@ -24,6 +24,7 @@ namespace pocketmine\tile;
use pocketmine\level\format\FullChunk;
use pocketmine\nbt\NBT;
use pocketmine\nbt\tag\Compound;
use pocketmine\network\Network;
use pocketmine\network\protocol\TileEntityDataPacket;
use pocketmine\Player;
@ -41,7 +42,7 @@ abstract class Spawnable extends Tile{
$pk->y = $this->y;
$pk->z = $this->z;
$pk->namedtag = $nbt->write();
$player->dataPacket($pk);
$player->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
return true;
}