mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
RegionLoader: fixed regions ballooning when writing chunks to the end of file
we already have a region growth problem due to the lack of garbage collection, but this bug was making it worse. If the region already contained 1024 allocated chunks, 4MB of file space would get wasted before the next chunk would be appended to the file.
This commit is contained in:
parent
e05bee5ffb
commit
745be19a56
@ -366,7 +366,7 @@ class RegionLoader{
|
||||
}
|
||||
|
||||
private function bumpNextFreeSector(RegionLocationTableEntry $entry) : void{
|
||||
$this->nextSector = max($this->nextSector, $entry->getLastSector()) + 1;
|
||||
$this->nextSector = max($this->nextSector, $entry->getLastSector() + 1);
|
||||
}
|
||||
|
||||
public function getX() : int{
|
||||
|
Loading…
x
Reference in New Issue
Block a user