From f54139c858e0c46c7a62c940165df1721a904986 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 11 May 2017 08:35:10 +0200 Subject: [PATCH] Fixing #11, console spamming --- src/Ad5001/BetterGen/populator/RavinePopulator.php | 4 +++- src/Ad5001/BetterGen/utils/BuildingUtils.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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;