diff --git a/src/Ad5001/BetterGen/populator/RavinePopulator.php b/src/Ad5001/BetterGen/populator/RavinePopulator.php index 34f1063..a689271 100644 --- a/src/Ad5001/BetterGen/populator/RavinePopulator.php +++ b/src/Ad5001/BetterGen/populator/RavinePopulator.php @@ -62,7 +62,7 @@ class RavinePopulator extends AmountPopulator { $x += $random->nextRange(0 + $diffX, 2 + $diffX ) - 1; $y += $random->nextRange(0, 2 ) - 1; $z += $random->nextRange(0 + $diffZ, 2 + $diffZ ) - 1; - $heigth += $random->nextRange(0, 2 ) - 1; + $height += $random->nextRange(0, 2 ) - 1; $length += $random->nextRange(0, 2 ) - 1; } } @@ -96,6 +96,8 @@ class RavinePopulator extends AmountPopulator { * @param $random pocketmine\utils\Random */ protected function buildRavinePart($x, $y, $z, $height, $length, Random $random) { + $xBounded = 0; + $zBounded = 0; for($xx = $x - $length; $xx <= $x + $length; $xx ++) { for($yy = $y; $yy <= $y + $height; $yy ++) { for($zz = $z - $length; $zz <= $z + $length; $zz ++) { diff --git a/src/Ad5001/BetterGen/utils/BuildingUtils.php b/src/Ad5001/BetterGen/utils/BuildingUtils.php index fd80252..c987582 100644 --- a/src/Ad5001/BetterGen/utils/BuildingUtils.php +++ b/src/Ad5001/BetterGen/utils/BuildingUtils.php @@ -175,7 +175,7 @@ class BuildingUtils { * @param $block pocketmine\block\Block * @return void */ - public function buildRandom(ChunkManager $level, Vector3 $pos, Vector3 $infos, Random $random, Block $block) { + public static function buildRandom(ChunkManager $level, Vector3 $pos, Vector3 $infos, Random $random, Block $block) { $xBounded = $random->nextBoundedInt(3 ) - 1; $yBounded = $random->nextBoundedInt(3 ) - 1; $zBounded = $random->nextBoundedInt(3 ) - 1;