Fixing #11, console spamming
This commit is contained in:
parent
5362a4cb81
commit
f54139c858
2 changed files with 4 additions and 2 deletions
|
@ -62,7 +62,7 @@ class RavinePopulator extends AmountPopulator {
|
||||||
$x += $random->nextRange(0 + $diffX, 2 + $diffX ) - 1;
|
$x += $random->nextRange(0 + $diffX, 2 + $diffX ) - 1;
|
||||||
$y += $random->nextRange(0, 2 ) - 1;
|
$y += $random->nextRange(0, 2 ) - 1;
|
||||||
$z += $random->nextRange(0 + $diffZ, 2 + $diffZ ) - 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;
|
$length += $random->nextRange(0, 2 ) - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,8 @@ class RavinePopulator extends AmountPopulator {
|
||||||
* @param $random pocketmine\utils\Random
|
* @param $random pocketmine\utils\Random
|
||||||
*/
|
*/
|
||||||
protected function buildRavinePart($x, $y, $z, $height, $length, Random $random) {
|
protected function buildRavinePart($x, $y, $z, $height, $length, Random $random) {
|
||||||
|
$xBounded = 0;
|
||||||
|
$zBounded = 0;
|
||||||
for($xx = $x - $length; $xx <= $x + $length; $xx ++) {
|
for($xx = $x - $length; $xx <= $x + $length; $xx ++) {
|
||||||
for($yy = $y; $yy <= $y + $height; $yy ++) {
|
for($yy = $y; $yy <= $y + $height; $yy ++) {
|
||||||
for($zz = $z - $length; $zz <= $z + $length; $zz ++) {
|
for($zz = $z - $length; $zz <= $z + $length; $zz ++) {
|
||||||
|
|
|
@ -175,7 +175,7 @@ class BuildingUtils {
|
||||||
* @param $block pocketmine\block\Block
|
* @param $block pocketmine\block\Block
|
||||||
* @return void
|
* @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;
|
$xBounded = $random->nextBoundedInt(3 ) - 1;
|
||||||
$yBounded = $random->nextBoundedInt(3 ) - 1;
|
$yBounded = $random->nextBoundedInt(3 ) - 1;
|
||||||
$zBounded = $random->nextBoundedInt(3 ) - 1;
|
$zBounded = $random->nextBoundedInt(3 ) - 1;
|
||||||
|
|
Loading…
Reference in a new issue