mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Implemented Channeled packet sending
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user