mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Level: Do level provider GC every 5 minutes from level tick
this should solve #1183, pending further testing.
This commit is contained in:
parent
50f273c041
commit
1e139743b8
@ -146,6 +146,8 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
/** @var LevelProvider */
|
||||
private $provider;
|
||||
/** @var int */
|
||||
private $providerGarbageCollectionTicker = 0;
|
||||
|
||||
/** @var int */
|
||||
private $worldHeight;
|
||||
@ -720,6 +722,10 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
$this->unloadChunks();
|
||||
if(++$this->providerGarbageCollectionTicker >= 6000){
|
||||
$this->provider->doGarbageCollection();
|
||||
$this->providerGarbageCollectionTicker = 0;
|
||||
}
|
||||
|
||||
//Do block updates
|
||||
$this->timings->doTickPending->startTiming();
|
||||
|
Loading…
x
Reference in New Issue
Block a user