mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Added documentation for Level->addChunkPacket()
this method is confusingly named
This commit is contained in:
parent
e2d66ac96d
commit
a5f4dda918
@ -601,6 +601,14 @@ class Level implements ChunkManager, Metadatable{
|
||||
return $this->chunkLoaders[Level::chunkHash($chunkX, $chunkZ)] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Queues a DataPacket to be sent to all players using the chunk at the specified X/Z coordinates at the end of the
|
||||
* current tick.
|
||||
*
|
||||
* @param int $chunkX
|
||||
* @param int $chunkZ
|
||||
* @param DataPacket $packet
|
||||
*/
|
||||
public function addChunkPacket(int $chunkX, int $chunkZ, DataPacket $packet){
|
||||
if(!isset($this->chunkPackets[$index = Level::chunkHash($chunkX, $chunkZ)])){
|
||||
$this->chunkPackets[$index] = [$packet];
|
||||
|
Loading…
x
Reference in New Issue
Block a user