152 $this->random->setSeed(0xdeadbeef ^ ($chunkX << 8) ^ $chunkZ ^ $this->level->getSeed());
156 $chunk = $this->level->getChunk($chunkX, $chunkZ);
158 for($x = 0; $x < 16; ++$x){
159 for($z = 0; $z < 16; ++$z){
162 $chunk->setBiomeId($x, $z, $biome->getId());
164 for($y = 0; $y < 128; ++$y){
165 if($y === 0 or $y === 127){
169 $noiseValue = (abs($this->emptyHeight - $y) / $this->emptyHeight) * $this->emptyAmplitude - $noise[$x][$z][$y];
170 $noiseValue -= 1 - $this->density;
174 }elseif($y <= $this->waterHeight){
176 $chunk->setBlockLight($x, $y + 1, $z, 15);
182 foreach($this->generationPopulators as $populator){
183 $populator->populate($this->level, $chunkX, $chunkZ, $this->random);