mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +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
@ -68,13 +68,13 @@ interface LevelProvider{
|
||||
/**
|
||||
* Generate the needed files in the path given
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $name
|
||||
* @param int|string $seed
|
||||
* @param string $generator
|
||||
* @param array[] $options
|
||||
* @param string $path
|
||||
* @param string $name
|
||||
* @param int $seed
|
||||
* @param string $generator
|
||||
* @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
|
||||
|
@ -135,7 +135,7 @@ class LevelDB extends BaseLevelProvider{
|
||||
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)){
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ class McRegion extends BaseLevelProvider{
|
||||
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)){
|
||||
mkdir($path, 0777, true);
|
||||
}
|
||||
@ -257,7 +257,7 @@ class McRegion extends BaseLevelProvider{
|
||||
"SpawnZ" => new IntTag("SpawnZ", 256),
|
||||
"version" => new IntTag("version", static::getPcWorldFormatVersion()),
|
||||
"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),
|
||||
"SizeOnDisk" => new LongTag("SizeOnDisk", 0),
|
||||
"Time" => new LongTag("Time", 0),
|
||||
|
Loading…
x
Reference in New Issue
Block a user