mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Do chunk orders and sending during onUpdate() when we know the player has been constructed
This commit is contained in:
parent
e9c46da7f0
commit
080b35bf53
@ -1679,6 +1679,14 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->nextChunkOrderRun-- <= 0 or $this->chunk === null){
|
||||||
|
$this->orderChunks();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($this->loadQueue) > 0 or !$this->spawned){
|
||||||
|
$this->sendNextChunk();
|
||||||
|
}
|
||||||
|
|
||||||
$this->timings->startTiming();
|
$this->timings->startTiming();
|
||||||
|
|
||||||
if($this->spawned){
|
if($this->spawned){
|
||||||
@ -1742,14 +1750,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->nextChunkOrderRun-- <= 0 or $this->chunk === null){
|
|
||||||
$this->orderChunks();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($this->loadQueue) > 0 or !$this->spawned){
|
|
||||||
$this->sendNextChunk();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($this->batchedPackets) > 0){
|
if(count($this->batchedPackets) > 0){
|
||||||
$this->server->batchPackets([$this], $this->batchedPackets, false);
|
$this->server->batchPackets([$this], $this->batchedPackets, false);
|
||||||
$this->batchedPackets = [];
|
$this->batchedPackets = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user