Fixing deadbush problem #12. Making ravines generate at the same time than caves.

This commit is contained in:
Adsooi 2017-05-11 08:52:55 +02:00
parent f54139c858
commit 8311298fbc
2 changed files with 3 additions and 3 deletions

View file

@ -170,7 +170,7 @@ class BetterNormal extends Generator {
$ravine = new RavinePopulator (); $ravine = new RavinePopulator ();
$ravine->setBaseAmount(0); $ravine->setBaseAmount(0);
$ravine->setRandomAmount(51); $ravine->setRandomAmount(51);
$this->populators [] = $ravine; $this->generationPopulators [] = $ravine;
$mineshaft = new MineshaftPopulator (); $mineshaft = new MineshaftPopulator ();
$mineshaft->setBaseAmount(0); $mineshaft->setBaseAmount(0);

View file

@ -37,8 +37,8 @@ class DeadbushPopulator extends AmountPopulator {
$z = $random->nextRange($chunkZ * 16, $chunkZ * 16 + 15); $z = $random->nextRange($chunkZ * 16, $chunkZ * 16 + 15);
$y = $this->getHighestWorkableBlock($x, $z); $y = $this->getHighestWorkableBlock($x, $z);
if ($y !== -1 && $level->getBlockIdAt($x, $y - 1, $z ) == Block::SAND) { if ($y !== -1 && $level->getBlockIdAt($x, $y - 1, $z ) == Block::SAND) {
$level->setBlockIdAt($x, $y, $z, Block::DEAD_BUSH); $level->setBlockIdAt($x, $y + 1, $z, Block::DEAD_BUSH);
$level->setBlockDataAt($x, $y, $z, 1); $level->setBlockDataAt($x, $y + 1, $z, 1);
} }
} }
} }