|
static | addGenerator ($object, $name) |
|
static | getGeneratorList () |
|
static | getGenerator ($name) |
|
static | getGeneratorName ($class) |
|
static | getFastNoise1D (Noise $noise, $xSize, $samplingRate, $x, $y, $z) |
|
static | getFastNoise2D (Noise $noise, $xSize, $zSize, $samplingRate, $x, $y, $z) |
|
static | getFastNoise3D (Noise $noise, $xSize, $ySize, $zSize, $xSamplingRate, $ySamplingRate, $zSamplingRate, $x, $y, $z) |
|
◆ __construct()
__construct |
( |
array |
$settings = [] | ) |
|
Void constructor.
- Parameters
-
61 $this->options = $settings;
◆ generateChunk()
generateChunk |
( |
|
$chunkX, |
|
|
|
$chunkZ |
|
) |
| |
- Parameters
-
- Returns
- mixed|void
82 if($this->emptyChunk === null){
83 $this->chunk = clone $this->level->getChunk($chunkX, $chunkZ);
84 $this->chunk->setGenerated();
86 for($Z = 0; $Z < 16; ++$Z){
87 for($X = 0; $X < 16; ++$X){
88 $this->chunk->setBiomeId($X, $Z, 1);
89 for($y = 0; $y < 128; ++$y){
90 $this->chunk->setBlockId($X, $y, $Z,
Block::AIR);
96 if($spawn->getX() >> 4 === $chunkX and $spawn->getZ() >> 4 === $chunkZ){
99 $this->emptyChunk = clone $this->chunk;
102 $this->chunk = clone $this->emptyChunk;
105 $chunk = clone $this->chunk;
106 $chunk->setX($chunkX);
107 $chunk->setZ($chunkZ);
108 $this->level->setChunk($chunkX, $chunkZ, $chunk);
◆ getName()
◆ getSettings()
◆ getSpawn()
- Returns
- Vector3
125 return new Vector3(128, 72, 128);
◆ init()
- Parameters
-
- Returns
- mixed|void
71 $this->level = $level;
72 $this->random = $random;
◆ populateChunk()
populateChunk |
( |
|
$chunkX, |
|
|
|
$chunkZ |
|
) |
| |
- Parameters
-
- Returns
- mixed|void
The documentation for this class was generated from the following file:
- src/pocketmine/level/generator/VoidGenerator.php