mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Fixed bad values assigned to LongTags
PhpStorm you bitch... why didn't you tell me these were a problem?!
This commit is contained in:
parent
2193adf844
commit
a302b4988f
@ -70,11 +70,11 @@ interface LevelProvider{
|
|||||||
*
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param int|string $seed
|
* @param int $seed
|
||||||
* @param string $generator
|
* @param string $generator
|
||||||
* @param array[] $options
|
* @param array[] $options
|
||||||
*/
|
*/
|
||||||
public static function generate(string $path, string $name, $seed, string $generator, array $options = []);
|
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the generator name
|
* Returns the generator name
|
||||||
|
@ -135,7 +135,7 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
return file_exists($path . "/level.dat") and is_dir($path . "/db/");
|
return file_exists($path . "/level.dat") and is_dir($path . "/db/");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function generate(string $path, string $name, $seed, string $generator, array $options = []){
|
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []){
|
||||||
if(!file_exists($path)){
|
if(!file_exists($path)){
|
||||||
mkdir($path, 0777, true);
|
mkdir($path, 0777, true);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ class McRegion extends BaseLevelProvider{
|
|||||||
return $isValid;
|
return $isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function generate(string $path, string $name, $seed, string $generator, array $options = []){
|
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []){
|
||||||
if(!file_exists($path)){
|
if(!file_exists($path)){
|
||||||
mkdir($path, 0777, true);
|
mkdir($path, 0777, true);
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ class McRegion extends BaseLevelProvider{
|
|||||||
"SpawnZ" => new IntTag("SpawnZ", 256),
|
"SpawnZ" => new IntTag("SpawnZ", 256),
|
||||||
"version" => new IntTag("version", static::getPcWorldFormatVersion()),
|
"version" => new IntTag("version", static::getPcWorldFormatVersion()),
|
||||||
"DayTime" => new IntTag("DayTime", 0),
|
"DayTime" => new IntTag("DayTime", 0),
|
||||||
"LastPlayed" => new LongTag("LastPlayed", microtime(true) * 1000),
|
"LastPlayed" => new LongTag("LastPlayed", (int) (microtime(true) * 1000)),
|
||||||
"RandomSeed" => new LongTag("RandomSeed", $seed),
|
"RandomSeed" => new LongTag("RandomSeed", $seed),
|
||||||
"SizeOnDisk" => new LongTag("SizeOnDisk", 0),
|
"SizeOnDisk" => new LongTag("SizeOnDisk", 0),
|
||||||
"Time" => new LongTag("Time", 0),
|
"Time" => new LongTag("Time", 0),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user