mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'stable'
This commit is contained in:
@ -32,6 +32,7 @@ use pocketmine\world\format\io\exception\CorruptedChunkException;
|
||||
use function assert;
|
||||
use function ceil;
|
||||
use function chr;
|
||||
use function clearstatcache;
|
||||
use function fclose;
|
||||
use function feof;
|
||||
use function file_exists;
|
||||
@ -91,6 +92,7 @@ class RegionLoader{
|
||||
* @throws CorruptedRegionException
|
||||
*/
|
||||
public function open() : void{
|
||||
clearstatcache(false, $this->filePath);
|
||||
$exists = file_exists($this->filePath);
|
||||
if(!$exists){
|
||||
touch($this->filePath);
|
||||
@ -370,6 +372,7 @@ class RegionLoader{
|
||||
fwrite($this->filePointer, Binary::writeInt($entry !== null ? ($entry->getFirstSector() << 8) | $entry->getSectorCount() : 0), 4);
|
||||
fseek($this->filePointer, 4096 + ($index << 2));
|
||||
fwrite($this->filePointer, Binary::writeInt($entry !== null ? $entry->getTimestamp() : 0), 4);
|
||||
clearstatcache(false, $this->filePath);
|
||||
}
|
||||
|
||||
protected function createBlank() : void{
|
||||
|
Reference in New Issue
Block a user