Fixed bad values assigned to LongTags

PhpStorm you bitch... why didn't you tell me these were a problem?!
This commit is contained in:
Dylan K. Taylor 2017-06-08 19:28:29 +01:00
parent 2193adf844
commit a302b4988f
3 changed files with 9 additions and 9 deletions

View File

@ -70,11 +70,11 @@ interface LevelProvider{
*
* @param string $path
* @param string $name
* @param int|string $seed
* @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

View File

@ -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);
}

View File

@ -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),