Browse Source

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

pull/18/head
Ad5001 3 years ago
parent
commit
8311298fbc
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/Ad5001/BetterGen/generator/BetterNormal.php
  2. +2
    -2
      src/Ad5001/BetterGen/populator/DeadbushPopulator.php

+ 1
- 1
src/Ad5001/BetterGen/generator/BetterNormal.php View File

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


+ 2
- 2
src/Ad5001/BetterGen/populator/DeadbushPopulator.php View File

@@ -37,8 +37,8 @@ class DeadbushPopulator extends AmountPopulator {
$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);
}
}
}


Loading…
Cancel
Save