mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Merge commit 'a5764b3ae98a70fe8f20f9b403a4ab84b51b11d8'
# Conflicts: # resources/vanilla # src/pocketmine/level/format/io/LevelProvider.php # src/world/generator/Generator.php # src/world/generator/GeneratorRegisterTask.php
This commit is contained in:
commit
465d8cda79
@ -949,6 +949,9 @@ class World implements ChunkManager{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed[]
|
||||||
|
*/
|
||||||
public function __debugInfo() : array{
|
public function __debugInfo() : array{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,8 @@ use pocketmine\world\format\Chunk;
|
|||||||
interface WritableWorldProvider extends WorldProvider{
|
interface WritableWorldProvider extends WorldProvider{
|
||||||
/**
|
/**
|
||||||
* Generate the needed files in the path given
|
* Generate the needed files in the path given
|
||||||
|
*
|
||||||
|
* @param mixed[] $options
|
||||||
*/
|
*/
|
||||||
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []) : void;
|
public static function generate(string $path, string $name, int $seed, string $generator, array $options = []) : void;
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@ class Flat extends Generator{
|
|||||||
private $preset;
|
private $preset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
*/
|
*/
|
||||||
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
||||||
|
@ -60,6 +60,8 @@ abstract class Generator{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
|
*
|
||||||
|
* @param mixed[] $options
|
||||||
*/
|
*/
|
||||||
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
||||||
$this->world = $world;
|
$this->world = $world;
|
||||||
|
@ -43,6 +43,9 @@ class GeneratorRegisterTask extends AsyncTask{
|
|||||||
/** @var int */
|
/** @var int */
|
||||||
public $worldHeight = World::Y_MAX;
|
public $worldHeight = World::Y_MAX;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed[] $generatorSettings
|
||||||
|
*/
|
||||||
public function __construct(World $world, string $generatorClass, array $generatorSettings = []){
|
public function __construct(World $world, string $generatorClass, array $generatorSettings = []){
|
||||||
$this->generatorClass = $generatorClass;
|
$this->generatorClass = $generatorClass;
|
||||||
$this->settings = serialize($generatorSettings);
|
$this->settings = serialize($generatorSettings);
|
||||||
|
@ -51,6 +51,8 @@ class Nether extends Generator{
|
|||||||
private $noiseBase;
|
private $noiseBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param mixed[] $options
|
||||||
|
*
|
||||||
* @throws InvalidGeneratorOptionsException
|
* @throws InvalidGeneratorOptionsException
|
||||||
*/
|
*/
|
||||||
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
||||||
|
@ -263,6 +263,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"));
|
||||||
|
@ -58,6 +58,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(ChunkManager $world, int $seed, array $options = []){
|
public function __construct(ChunkManager $world, int $seed, array $options = []){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user