mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 13:49:55 +00:00
World: drop global packet broadcast
This commit is contained in:
parent
b1021315b0
commit
c490bc5a8c
@ -168,8 +168,6 @@ class World implements ChunkManager{
|
||||
|
||||
/** @var ClientboundPacket[][] */
|
||||
private $chunkPackets = [];
|
||||
/** @var ClientboundPacket[] */
|
||||
private $globalPackets = [];
|
||||
|
||||
/** @var float[] */
|
||||
private $unloadQueue = [];
|
||||
@ -534,13 +532,6 @@ class World implements ChunkManager{
|
||||
$this->addChunkPacket($pos->getFloorX() >> 4, $pos->getFloorZ() >> 4, $packet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts a packet to every player in the world.
|
||||
*/
|
||||
public function broadcastGlobalPacket(ClientboundPacket $packet) : void{
|
||||
$this->globalPackets[] = $packet;
|
||||
}
|
||||
|
||||
public function registerChunkLoader(ChunkLoader $loader, int $chunkX, int $chunkZ, bool $autoLoad = true) : void{
|
||||
$loaderId = spl_object_id($loader);
|
||||
|
||||
@ -783,13 +774,6 @@ class World implements ChunkManager{
|
||||
$this->checkSleep();
|
||||
}
|
||||
|
||||
if(count($this->globalPackets) > 0){
|
||||
if(count($this->players) > 0){
|
||||
$this->server->broadcastPackets($this->players, $this->globalPackets);
|
||||
}
|
||||
$this->globalPackets = [];
|
||||
}
|
||||
|
||||
foreach($this->chunkPackets as $index => $entries){
|
||||
World::getXZ($index, $chunkX, $chunkZ);
|
||||
$chunkPlayers = $this->getChunkPlayers($chunkX, $chunkZ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user