Fixing #11, console spamming

This commit is contained in:
Ad5001 2017-05-11 08:35:10 +02:00
parent 5362a4cb81
commit f54139c858
2 changed files with 4 additions and 2 deletions

View File

@ -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 ++) {

View File

@ -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;