mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Flat: use a less dumb way to build biome array
This commit is contained in:
parent
9835d75f65
commit
401e8d117b
@ -25,6 +25,7 @@ namespace pocketmine\world\generator;
|
||||
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\world\ChunkManager;
|
||||
use pocketmine\world\format\BiomeArray;
|
||||
use pocketmine\world\format\Chunk;
|
||||
use pocketmine\world\format\SubChunk;
|
||||
use pocketmine\world\generator\object\OreType;
|
||||
@ -68,14 +69,7 @@ class Flat extends Generator{
|
||||
}
|
||||
|
||||
protected function generateBaseChunk() : void{
|
||||
$this->chunk = new Chunk();
|
||||
|
||||
$biomeId = $this->options->getBiomeId();
|
||||
for($Z = 0; $Z < Chunk::EDGE_LENGTH; ++$Z){
|
||||
for($X = 0; $X < Chunk::EDGE_LENGTH; ++$X){
|
||||
$this->chunk->setBiomeId($X, $Z, $biomeId);
|
||||
}
|
||||
}
|
||||
$this->chunk = new Chunk([], BiomeArray::fill($this->options->getBiomeId()));
|
||||
|
||||
$structure = $this->options->getStructure();
|
||||
$count = count($structure);
|
||||
|
Loading…
x
Reference in New Issue
Block a user