9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2026-01-04 15:41:30 +00:00

Terrain improvements

This commit is contained in:
Daniel Mills
2020-01-04 15:24:03 -05:00
parent 93e02093be
commit c2d7fe8612
5 changed files with 17 additions and 14 deletions

View File

@@ -9,10 +9,10 @@ public class Settings
public static class PerformanceSettings public static class PerformanceSettings
{ {
public PerformanceMode performanceMode = PerformanceMode.HALF_CPU; public PerformanceMode performanceMode = PerformanceMode.MATCH_CPU;
public int threadCount = 12; public int threadCount = 12;
public int threadPriority = Thread.MIN_PRIORITY; public int threadPriority = Thread.MIN_PRIORITY;
public boolean loadonstart = false; public boolean loadonstart = true;
} }
public static class GeneratorSettings public static class GeneratorSettings
@@ -26,8 +26,9 @@ public class Settings
public double superHeightScale = 0.95; public double superHeightScale = 0.95;
public double baseHeight = 0.165; public double baseHeight = 0.165;
public int seaLevel = 63; public int seaLevel = 63;
public double caveDensity = 3;
public double biomeScale = 2.46; public double biomeScale = 2.46;
public boolean flatBedrock = false; public boolean flatBedrock = false;
public boolean doSchematics = false; public boolean doSchematics = true;
} }
} }

View File

@@ -106,8 +106,8 @@ public class IrisGenerator extends ParallelChunkGenerator
public Biome genColumn(int wxx, int wzx, int x, int z, ChunkPlan plan) public Biome genColumn(int wxx, int wzx, int x, int z, ChunkPlan plan)
{ {
int seaLevel = Iris.settings.gen.seaLevel; int seaLevel = Iris.settings.gen.seaLevel;
int wx = (int) Math.round((double) wxx * Iris.settings.gen.horizontalZoom); double wx = Math.round((double) wxx * Iris.settings.gen.horizontalZoom);
int wz = (int) Math.round((double) wzx * Iris.settings.gen.horizontalZoom); double wz = Math.round((double) wzx * Iris.settings.gen.horizontalZoom);
IrisBiome biome = glBiome.getBiome(wx * Iris.settings.gen.biomeScale, wz * Iris.settings.gen.biomeScale); IrisBiome biome = glBiome.getBiome(wx * Iris.settings.gen.biomeScale, wz * Iris.settings.gen.biomeScale);
double hv = IrisInterpolation.getBicubicNoise(wxx, wzx, (xf, zf) -> getBiomedHeight((int) Math.round(xf), (int) Math.round(zf), plan)); double hv = IrisInterpolation.getBicubicNoise(wxx, wzx, (xf, zf) -> getBiomedHeight((int) Math.round(xf), (int) Math.round(zf), plan));
hv += glLNoise.generateLayer(hv, wxx, wzx); hv += glLNoise.generateLayer(hv, wxx, wzx);
@@ -129,7 +129,7 @@ public class IrisGenerator extends ParallelChunkGenerator
if(underground && (height - 1) - i < glBase.scatterInt(x, i, z, 4) + 2) if(underground && (height - 1) - i < glBase.scatterInt(x, i, z, 4) + 2)
{ {
mb = biome.getDirt(wx, wz); mb = biome.getDirtRNG();
} }
if(i == height - 1) if(i == height - 1)

View File

@@ -145,7 +145,7 @@ public class IrisBiome
.schematic("boulder/smooth", 0.01) .schematic("boulder/smooth", 0.01)
.schematic("tree/redwood", 1.11) .schematic("tree/redwood", 1.11)
.schematic("tree/redwood/tall", 2.51) .schematic("tree/redwood/tall", 2.51)
.height(0.165) .height(0.365)
.scatter(MB.of(Material.LONG_GRASS, 2), 0.13); .scatter(MB.of(Material.LONG_GRASS, 2), 0.13);
public static final IrisBiome HAUNTED_FOREST = new IrisBiome("Haunted Forest", Biome.MUTATED_SWAMPLAND) public static final IrisBiome HAUNTED_FOREST = new IrisBiome("Haunted Forest", Biome.MUTATED_SWAMPLAND)
.scatter(MB.of(Material.LONG_GRASS, 1), 0.13) .scatter(MB.of(Material.LONG_GRASS, 1), 0.13)
@@ -196,7 +196,7 @@ public class IrisBiome
.scatter(MB.of(Material.LONG_GRASS, 2), 0.04) .scatter(MB.of(Material.LONG_GRASS, 2), 0.04)
.amp(1.565) .amp(1.565)
.schematic("boulder/smooth", 0.01) .schematic("boulder/smooth", 0.01)
.height(0.142); .height(0.342);
public static final IrisBiome EXTREME_HILLS_TREES = new IrisBiome("Extreme Hills +", Biome.EXTREME_HILLS_WITH_TREES) public static final IrisBiome EXTREME_HILLS_TREES = new IrisBiome("Extreme Hills +", Biome.EXTREME_HILLS_WITH_TREES)
.scatter(MB.of(Material.LONG_GRASS, 2), 0.09) .scatter(MB.of(Material.LONG_GRASS, 2), 0.09)
.schematic("boulder", 0.02) .schematic("boulder", 0.02)
@@ -204,7 +204,7 @@ public class IrisBiome
.schematic("boulder/smooth", 0.01) .schematic("boulder/smooth", 0.01)
.schematic("tree/redwood/tall", 3.02) .schematic("tree/redwood/tall", 3.02)
.amp(1.525) .amp(1.525)
.height(0.152); .height(0.352);
public static final IrisBiome TAIGA_COLD = new IrisBiome("Taiga Cold", Biome.TAIGA_COLD) public static final IrisBiome TAIGA_COLD = new IrisBiome("Taiga Cold", Biome.TAIGA_COLD)
.scatter(MB.of(Material.LONG_GRASS, 2), 0.04) .scatter(MB.of(Material.LONG_GRASS, 2), 0.04)
.schematic("tree/pine", 2.51) .schematic("tree/pine", 2.51)
@@ -234,6 +234,7 @@ public class IrisBiome
.schematic("boulder", 0.02) .schematic("boulder", 0.02)
.schematic("tree/redwood", 3.5) .schematic("tree/redwood", 3.5)
.amp(0.75) .amp(0.75)
.height(0.167)
.simplexSurface(); .simplexSurface();
//@done //@done
@@ -365,7 +366,7 @@ public class IrisBiome
return dirt; return dirt;
} }
public MB getSurface(int x, int z, RNG rng) public MB getSurface(double x, double z, RNG rng)
{ {
double wx = x + 1000D; double wx = x + 1000D;
double wz = z + 1000D; double wz = z + 1000D;
@@ -398,7 +399,7 @@ public class IrisBiome
return getSurface().getRandom(); return getSurface().getRandom();
} }
public MB getDirt(int wx, int wz) public MB getDirtRNG()
{ {
return getDirt().getRandom(); return getDirt().getRandom();
} }

View File

@@ -5,6 +5,7 @@ import java.util.Random;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.World; import org.bukkit.World;
import ninja.bytecode.iris.Iris;
import ninja.bytecode.iris.generator.IrisGenerator; import ninja.bytecode.iris.generator.IrisGenerator;
import ninja.bytecode.iris.util.GenLayer; import ninja.bytecode.iris.util.GenLayer;
import ninja.bytecode.iris.util.MaxingGenerator; import ninja.bytecode.iris.util.MaxingGenerator;
@@ -30,7 +31,7 @@ public class GenLayerCaves extends GenLayer
public void genCaves(double wxx, double wzx, int x, int z, int s, IrisGenerator g) public void genCaves(double wxx, double wzx, int x, int z, int s, IrisGenerator g)
{ {
for(double itr = 0; itr < 0.4; itr += 0.1) for(double itr = 0; itr < 0.1 * Iris.settings.gen.caveDensity; itr += 0.1)
{ {
double thickness = 0.25 + itr + (0.5 * caveClamp.noise(wxx, wzx)); double thickness = 0.25 + itr + (0.5 * caveClamp.noise(wxx, wzx));
double size = 3.88D * thickness; double size = 3.88D * thickness;

View File

@@ -16,7 +16,7 @@ public class IrisInterpolation
public static double getBilinearNoise(int x, int z, NoiseProvider n) public static double getBilinearNoise(int x, int z, NoiseProvider n)
{ {
int h = 5; int h = 3;
int fx = x >> h; int fx = x >> h;
int fz = z >> h; int fz = z >> h;
int xa = (fx << h) - 2; int xa = (fx << h) - 2;
@@ -35,7 +35,7 @@ public class IrisInterpolation
public static double getBicubicNoise(int x, int z, NoiseProvider n) public static double getBicubicNoise(int x, int z, NoiseProvider n)
{ {
int h = 5; int h = 6;
int fx = x >> h; int fx = x >> h;
int fz = z >> h; int fz = z >> h;
int xa = (fx << h); int xa = (fx << h);