mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
fill in more iterable types (master)
This commit is contained in:
@ -39,6 +39,10 @@ interface WorldData{
|
||||
*/
|
||||
public function getGenerator() : string;
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
* @phpstan-return array<string, mixed>
|
||||
*/
|
||||
public function getGeneratorOptions() : array;
|
||||
|
||||
public function getSeed() : int;
|
||||
|
@ -53,6 +53,11 @@ class BedrockWorldData extends BaseNbtWorldData{
|
||||
public const GENERATOR_INFINITE = 1;
|
||||
public const GENERATOR_FLAT = 2;
|
||||
|
||||
/**
|
||||
* @param mixed[] $options
|
||||
* @phpstan-param class-string<Generator> $generator
|
||||
* @phpstan-param array<string, mixed> $options
|
||||
*/
|
||||
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []) : void{
|
||||
Utils::testValidInstance($generator, Generator::class);
|
||||
switch($generator){
|
||||
|
@ -41,6 +41,11 @@ use function microtime;
|
||||
|
||||
class JavaWorldData extends BaseNbtWorldData{
|
||||
|
||||
/**
|
||||
* @param mixed[] $options
|
||||
* @phpstan-param class-string<Generator> $generator
|
||||
* @phpstan-param array<string, mixed> $options
|
||||
*/
|
||||
public static function generate(string $path, string $name, int $seed, string $generator, array $options = [], int $version = 19133) : void{
|
||||
Utils::testValidInstance($generator, Generator::class);
|
||||
//TODO, add extra details
|
||||
|
@ -72,6 +72,11 @@ abstract class RegionWorldProvider extends BaseWorldProvider{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed[] $options
|
||||
* @phpstan-param class-string<Generator> $generator
|
||||
* @phpstan-param array<string, mixed> $options
|
||||
*/
|
||||
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []) : void{
|
||||
Utils::testValidInstance($generator, Generator::class);
|
||||
if(!file_exists($path)){
|
||||
|
Reference in New Issue
Block a user