Improved heightmap generation

This commit is contained in:
Shoghi Cervantes
2015-04-29 23:19:27 +02:00
parent 7754aa71a3
commit d4b2e3d1b7
7 changed files with 27 additions and 13 deletions

View File

@ -106,6 +106,7 @@ class PopulationTask extends AsyncTask{
$generator->populateChunk($chunk->getX(), $chunk->getZ());
$chunk = $manager->getChunk($chunk->getX(), $chunk->getZ());
$chunk->recalculateHeightMap();
$chunk->setPopulated(true);
$this->chunk = $chunk->toFastBinary();

View File

@ -251,7 +251,7 @@ class Normal extends Generator{
if($noiseValue >= 0){
$chunk->setBlockId($x, $y, $z, Block::STONE);
}else{
}/*else{
if($y <= $this->waterHeight){
$chunk->setBlockId($x, $y, $z, Block::STILL_WATER);
$lightValue = 15 - ($this->waterHeight - $y) * 2;
@ -261,7 +261,7 @@ class Normal extends Generator{
}else{
$chunk->setBlockSkyLight($x, $y, $z, 15);
}
}
}*/
}
}
}