Skip to content

Commit

Permalink
Fixing deadbush problem #12. Making ravines generate at the same time…
Browse files Browse the repository at this point in the history
… than caves.
  • Loading branch information
Ad5001 committed May 11, 2017
1 parent f54139c commit 8311298
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Ad5001/BetterGen/generator/BetterNormal.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function init(ChunkManager $level, Random $random) {
$ravine = new RavinePopulator ();
$ravine->setBaseAmount(0);
$ravine->setRandomAmount(51);
$this->populators [] = $ravine;
$this->generationPopulators [] = $ravine;

$mineshaft = new MineshaftPopulator ();
$mineshaft->setBaseAmount(0);
Expand Down
4 changes: 2 additions & 2 deletions src/Ad5001/BetterGen/populator/DeadbushPopulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function populate(ChunkManager $level, $chunkX, $chunkZ, Random $random)
$z = $random->nextRange($chunkZ * 16, $chunkZ * 16 + 15);
$y = $this->getHighestWorkableBlock($x, $z);
if ($y !== -1 && $level->getBlockIdAt($x, $y - 1, $z ) == Block::SAND) {
$level->setBlockIdAt($x, $y, $z, Block::DEAD_BUSH);
$level->setBlockDataAt($x, $y, $z, 1);
$level->setBlockIdAt($x, $y + 1, $z, Block::DEAD_BUSH);
$level->setBlockDataAt($x, $y + 1, $z, 1);
}
}
}
Expand Down

0 comments on commit 8311298

Please sign in to comment.