Browse Source

Fixing mineshaft going too up

pull/34/head
Ad5001 3 years ago
parent
commit
becff0ca47
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Ad5001/BetterGen/populator/MineshaftPopulator.php

+ 1
- 1
src/Ad5001/BetterGen/populator/MineshaftPopulator.php View File

@@ -80,7 +80,7 @@ class MineshaftPopulator extends AmountPopulator {
* @param Random $random
*/
public function generateMineshaftPart(int $x, int $y, int $z, int $dir, Random $random) {
if ($this->maxPath -- < 1)
if ($this->maxPath -- < 1 || $y >= $level->getChunk(($x - ($x % 16)) / 16, ($z - ($z % 16)) / 16)->getHighestBlockAt($x % 16, $z % 16) - 10)
return;
$type = $random->nextBoundedInt(3);
$level = $this->level;


Loading…
Cancel
Save