mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Undo my -100IQ fuckup with chunk sending precondition
the commit I reverted put the preconditions in the completion handler,
which is executed AFTER THE CHUNK IS SENT.
Revert "NetworkSession: allow Player to handle its own business in chunk sending"
This reverts commit a223d1cbf3
.
This commit is contained in:
@ -743,11 +743,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
unset($this->loadQueue[$index]);
|
||||
$this->usedChunks[$index] = UsedChunkStatus::REQUESTED();
|
||||
|
||||
$this->getNetworkSession()->startUsingChunk($X, $Z, function() use ($X, $Z, $index, $world) : void{
|
||||
if(!isset($this->usedChunks[$index]) || $world !== $this->getWorld()){
|
||||
$this->logger->debug("Tried to send no-longer-active chunk $X $Z in world " . $world->getFolderName());
|
||||
return;
|
||||
}
|
||||
$this->getNetworkSession()->startUsingChunk($X, $Z, function() use ($X, $Z, $index) : void{
|
||||
if(!$this->usedChunks[$index]->equals(UsedChunkStatus::REQUESTED())){
|
||||
//TODO: make this an error
|
||||
//this could be triggered due to the shitty way that chunk resends are handled
|
||||
|
Reference in New Issue
Block a user