Browse Source

Fixing #11, console spamming

pull/18/head
Ad5001 2 years ago
parent
commit
f54139c858

+ 3
- 1
src/Ad5001/BetterGen/populator/RavinePopulator.php 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 ++) {

+ 1
- 1
src/Ad5001/BetterGen/utils/BuildingUtils.php 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;

Loading…
Cancel
Save