mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
populate missing array value types in level namespace
This commit is contained in:
parent
8bf469f7fc
commit
a5764b3ae9
@ -1137,6 +1137,9 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed[]
|
||||||
|
*/
|
||||||
public function __debugInfo() : array{
|
public function __debugInfo() : array{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,8 @@ interface LevelProvider{
|
|||||||
/**
|
/**
|
||||||
* Generate the needed files in the path given
|
* Generate the needed files in the path given
|
||||||
*
|
*
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []);
|
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []);
|
||||||
@ -62,6 +64,9 @@ interface LevelProvider{
|
|||||||
*/
|
*/
|
||||||
public function getGenerator() : string;
|
public function getGenerator() : string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed[]
|
||||||
|
*/
|
||||||
public function getGeneratorOptions() : array;
|
public function getGeneratorOptions() : array;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,6 +64,8 @@ class Flat extends Generator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
*/
|
*/
|
||||||
public function __construct(array $options = []){
|
public function __construct(array $options = []){
|
||||||
|
@ -56,6 +56,8 @@ abstract class Generator{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
|
*
|
||||||
|
* @param mixed[] $settings
|
||||||
*/
|
*/
|
||||||
abstract public function __construct(array $settings = []);
|
abstract public function __construct(array $settings = []);
|
||||||
|
|
||||||
@ -68,6 +70,9 @@ abstract class Generator{
|
|||||||
|
|
||||||
abstract public function populateChunk(int $chunkX, int $chunkZ) : void;
|
abstract public function populateChunk(int $chunkX, int $chunkZ) : void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed[]
|
||||||
|
*/
|
||||||
abstract public function getSettings() : array;
|
abstract public function getSettings() : array;
|
||||||
|
|
||||||
abstract public function getName() : string;
|
abstract public function getName() : string;
|
||||||
|
@ -45,6 +45,9 @@ class GeneratorRegisterTask extends AsyncTask{
|
|||||||
/** @var int */
|
/** @var int */
|
||||||
public $worldHeight = Level::Y_MAX;
|
public $worldHeight = Level::Y_MAX;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed[] $generatorSettings
|
||||||
|
*/
|
||||||
public function __construct(Level $level, string $generatorClass, array $generatorSettings = []){
|
public function __construct(Level $level, string $generatorClass, array $generatorSettings = []){
|
||||||
$this->generatorClass = $generatorClass;
|
$this->generatorClass = $generatorClass;
|
||||||
$this->settings = serialize($generatorSettings);
|
$this->settings = serialize($generatorSettings);
|
||||||
|
@ -53,6 +53,8 @@ class Nether extends Generator{
|
|||||||
private $noiseBase;
|
private $noiseBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
*/
|
*/
|
||||||
public function __construct(array $options = []){
|
public function __construct(array $options = []){
|
||||||
|
@ -307,6 +307,9 @@ abstract class Noise{
|
|||||||
return $noiseArray;
|
return $noiseArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return float[][][]
|
||||||
|
*/
|
||||||
public function getFastNoise3D(int $xSize, int $ySize, int $zSize, int $xSamplingRate, int $ySamplingRate, int $zSamplingRate, int $x, int $y, int $z) : array{
|
public function getFastNoise3D(int $xSize, int $ySize, int $zSize, int $xSamplingRate, int $ySamplingRate, int $zSamplingRate, int $x, int $y, int $z) : array{
|
||||||
|
|
||||||
assert($xSamplingRate !== 0, new \InvalidArgumentException("xSamplingRate cannot be 0"));
|
assert($xSamplingRate !== 0, new \InvalidArgumentException("xSamplingRate cannot be 0"));
|
||||||
|
@ -61,6 +61,8 @@ class Normal extends Generator{
|
|||||||
private static $SMOOTH_SIZE = 2;
|
private static $SMOOTH_SIZE = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
*/
|
*/
|
||||||
public function __construct(array $options = []){
|
public function __construct(array $options = []){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user