diff --git a/src/world/generator/Flat.php b/src/world/generator/Flat.php index fff96db94..39d782de3 100644 --- a/src/world/generator/Flat.php +++ b/src/world/generator/Flat.php @@ -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);