mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-29 00:26:56 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12450134566
This commit is contained in:
commit
1c35987ead
@ -33,6 +33,7 @@ use function basename;
|
|||||||
use function crc32;
|
use function crc32;
|
||||||
use function file_exists;
|
use function file_exists;
|
||||||
use function floor;
|
use function floor;
|
||||||
|
use function flush;
|
||||||
use function microtime;
|
use function microtime;
|
||||||
use function mkdir;
|
use function mkdir;
|
||||||
use function random_bytes;
|
use function random_bytes;
|
||||||
@ -150,6 +151,10 @@ class FormatConverter{
|
|||||||
$diff = $time - $thisRound;
|
$diff = $time - $thisRound;
|
||||||
$thisRound = $time;
|
$thisRound = $time;
|
||||||
$this->logger->info("Converted $counter / $count chunks (" . floor($this->chunksPerProgressUpdate / $diff) . " chunks/sec)");
|
$this->logger->info("Converted $counter / $count chunks (" . floor($this->chunksPerProgressUpdate / $diff) . " chunks/sec)");
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
if(($counter % (2 ** 16)) === 0){
|
||||||
|
$new->doGarbageCollection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$total = microtime(true) - $start;
|
$total = microtime(true) - $start;
|
||||||
|
@ -52,7 +52,7 @@ $writableFormats = array_filter($providerManager->getAvailableProviders(), fn(Wo
|
|||||||
$requiredOpts = [
|
$requiredOpts = [
|
||||||
"world" => "path to the input world for conversion",
|
"world" => "path to the input world for conversion",
|
||||||
"backup" => "path to back up the original files",
|
"backup" => "path to back up the original files",
|
||||||
"format" => "desired output format (can be one of: " . implode(",", array_keys($writableFormats)) . ")"
|
"format" => "desired output format (can be one of: " . implode(", ", array_keys($writableFormats)) . ")"
|
||||||
];
|
];
|
||||||
$usageMessage = "Options:\n";
|
$usageMessage = "Options:\n";
|
||||||
foreach($requiredOpts as $_opt => $_desc){
|
foreach($requiredOpts as $_opt => $_desc){
|
||||||
@ -89,7 +89,7 @@ if(count($oldProviderClasses) === 0){
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if(count($oldProviderClasses) > 1){
|
if(count($oldProviderClasses) > 1){
|
||||||
fwrite(STDERR, "Ambiguous input world format: matched " . count($oldProviderClasses) . " (" . implode(array_keys($oldProviderClasses)) . ")" . PHP_EOL);
|
fwrite(STDERR, "Ambiguous input world format: matched " . count($oldProviderClasses) . " (" . implode(", ", array_keys($oldProviderClasses)) . ")" . PHP_EOL);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
$oldProviderClass = array_shift($oldProviderClasses);
|
$oldProviderClass = array_shift($oldProviderClasses);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user