From ec52877877a32451a38428f106138b3f7198a431 Mon Sep 17 00:00:00 2001 From: dags- Date: Sun, 19 Jan 2020 21:22:15 +0000 Subject: [PATCH] minor tweak to the number of main river attempts per region --- .../java/com/terraforged/core/world/river/RiverRegion.java | 5 ++--- TerraForgedMod | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/TerraForgedCore/src/main/java/com/terraforged/core/world/river/RiverRegion.java b/TerraForgedCore/src/main/java/com/terraforged/core/world/river/RiverRegion.java index 44913e8..0298b32 100644 --- a/TerraForgedCore/src/main/java/com/terraforged/core/world/river/RiverRegion.java +++ b/TerraForgedCore/src/main/java/com/terraforged/core/world/river/RiverRegion.java @@ -25,7 +25,6 @@ public class RiverRegion { // private static final float LAKE_MIN_SIZE = 50; // private static final float LAKE_MAX_SIZE = 100; - private final int seed; private final Domain domain; private final Terrains terrains; private final LakeConfig lake; @@ -37,7 +36,7 @@ public class RiverRegion { private final List lakes = new LinkedList<>(); public RiverRegion(int regionX, int regionZ, WorldHeightmap heightmap, GeneratorContext context, RiverConfig primary, RiverConfig secondary, RiverConfig tertiary, LakeConfig lake) { - this.seed = new Random(NoiseUtil.seed(regionX, regionZ)).nextInt(); + int seed = new Random(NoiseUtil.seed(regionX, regionZ)).nextInt(); this.lake = lake; this.primary = primary; this.secondary = secondary; @@ -70,7 +69,7 @@ public class RiverRegion { List rivers = new LinkedList<>(); // generates main rivers until either 10 attempts have passed or 2 rivers generate - for (int i = 0; rivers.size() < 1 && i < 20; i++) { + for (int i = 0; rivers.size() < 2 && i < 50; i++) { generateRiver(x, z, pos, primary, random, rivers); } diff --git a/TerraForgedMod b/TerraForgedMod index f76fe1f..5271ab2 160000 --- a/TerraForgedMod +++ b/TerraForgedMod @@ -1 +1 @@ -Subproject commit f76fe1fde7ef92ce920113550b42f6254918b538 +Subproject commit 5271ab24a768d5cefad117c911bae82615ad33f1