populate missing array value types in level namespace

This commit is contained in:
Dylan K. Taylor
2020-01-30 21:01:59 +00:00
parent 8bf469f7fc
commit a5764b3ae9
8 changed files with 25 additions and 0 deletions

View File

@ -64,6 +64,8 @@ class Flat extends Generator{
}
/**
* @param mixed[] $options
*
* @throws InvalidGeneratorOptionsException
*/
public function __construct(array $options = []){

View File

@ -56,6 +56,8 @@ abstract class Generator{
/**
* @throws InvalidGeneratorOptionsException
*
* @param mixed[] $settings
*/
abstract public function __construct(array $settings = []);
@ -68,6 +70,9 @@ abstract class Generator{
abstract public function populateChunk(int $chunkX, int $chunkZ) : void;
/**
* @return mixed[]
*/
abstract public function getSettings() : array;
abstract public function getName() : string;

View File

@ -45,6 +45,9 @@ class GeneratorRegisterTask extends AsyncTask{
/** @var int */
public $worldHeight = Level::Y_MAX;
/**
* @param mixed[] $generatorSettings
*/
public function __construct(Level $level, string $generatorClass, array $generatorSettings = []){
$this->generatorClass = $generatorClass;
$this->settings = serialize($generatorSettings);

View File

@ -53,6 +53,8 @@ class Nether extends Generator{
private $noiseBase;
/**
* @param mixed[] $options
*
* @throws InvalidGeneratorOptionsException
*/
public function __construct(array $options = []){

View File

@ -307,6 +307,9 @@ abstract class Noise{
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{
assert($xSamplingRate !== 0, new \InvalidArgumentException("xSamplingRate cannot be 0"));

View File

@ -61,6 +61,8 @@ class Normal extends Generator{
private static $SMOOTH_SIZE = 2;
/**
* @param mixed[] $options
*
* @throws InvalidGeneratorOptionsException
*/
public function __construct(array $options = []){