From 8311298fbc3b202fab8c0910eb0e20143f071b52 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 11 May 2017 08:52:55 +0200 Subject: [PATCH] Fixing deadbush problem #12. Making ravines generate at the same time than caves. --- src/Ad5001/BetterGen/generator/BetterNormal.php | 2 +- src/Ad5001/BetterGen/populator/DeadbushPopulator.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Ad5001/BetterGen/generator/BetterNormal.php b/src/Ad5001/BetterGen/generator/BetterNormal.php index e9a56ea..cc33850 100644 --- a/src/Ad5001/BetterGen/generator/BetterNormal.php +++ b/src/Ad5001/BetterGen/generator/BetterNormal.php @@ -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); diff --git a/src/Ad5001/BetterGen/populator/DeadbushPopulator.php b/src/Ad5001/BetterGen/populator/DeadbushPopulator.php index df60a6a..fbadc13 100644 --- a/src/Ad5001/BetterGen/populator/DeadbushPopulator.php +++ b/src/Ad5001/BetterGen/populator/DeadbushPopulator.php @@ -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); } } }