mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-31 04:46:40 +00:00
Fixes
This commit is contained in:
@@ -6,7 +6,7 @@ public enum Dispersion
|
||||
{
|
||||
@DontObfuscate
|
||||
SCATTER,
|
||||
|
||||
|
||||
@DontObfuscate
|
||||
WISPY,
|
||||
WISPY;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class IrisDepositGenerator
|
||||
|
||||
int x = rng.i(af, bf);
|
||||
int z = rng.i(af, bf);
|
||||
int height = (int) (Math.round(g.getTerrainWaterHeight(x, z))) - 5;
|
||||
int height = (int) (Math.round(g.getTerrainWaterHeight(x, z))) - 2;
|
||||
|
||||
if(height <= 0)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ public class IrisDepositGenerator
|
||||
int ny = j.getBlockY() + h;
|
||||
int nz = j.getBlockZ() + z;
|
||||
|
||||
if(nx > 15 || nx < 0 || ny > 255 || ny < 0 || nz < 0 || nz > 15)
|
||||
if(ny > height || nx > 15 || nx < 0 || ny > 255 || ny < 0 || nz < 0 || nz > 15)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ public class IrisRegionRidge
|
||||
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
||||
private InferredType as = InferredType.DEFER;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
||||
private double noiseMultiplier = 0;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The chance this biome will be placed in a given spot")
|
||||
private double chance = 0.75;
|
||||
@@ -47,6 +51,10 @@ public class IrisRegionRidge
|
||||
@Desc("The thickness of the vein")
|
||||
private double thickness = 0.125;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
||||
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
||||
|
||||
private transient CellGenerator spot;
|
||||
private transient CellGenerator ridge;
|
||||
|
||||
@@ -55,6 +63,30 @@ public class IrisRegionRidge
|
||||
|
||||
}
|
||||
|
||||
public double getRidgeHeight(RNG rng, double x, double z)
|
||||
{
|
||||
if(getNoiseMultiplier() == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(ridge == null)
|
||||
{
|
||||
ridge = new CellGenerator(rng.nextParallelRNG((int) (465583 * getChance())));
|
||||
ridge.setCellScale(scale);
|
||||
ridge.setShuffle(shuffle);
|
||||
}
|
||||
|
||||
if(spot == null)
|
||||
{
|
||||
spot = new CellGenerator(rng.nextParallelRNG((int) (198523 * getChance())));
|
||||
spot.setCellScale(chanceScale);
|
||||
spot.setShuffle(shuffle);
|
||||
}
|
||||
|
||||
return spot.getDistance(x, z) * ridge.getDistance(x, z) * getNoiseMultiplier();
|
||||
}
|
||||
|
||||
public boolean isRidge(RNG rng, double x, double z)
|
||||
{
|
||||
if(ridge == null)
|
||||
|
||||
@@ -23,6 +23,10 @@ public class IrisRegionSpot
|
||||
@Desc("What type this spot is (i.e. target SEA but as LAND) like an island. Default matches the target type")
|
||||
private InferredType as = InferredType.DEFER;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Use the distance from cell value to add or remove noise value. (Forces depth or height)")
|
||||
private double noiseMultiplier = 0;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The scale of splotches")
|
||||
private double scale = 1;
|
||||
@@ -35,6 +39,10 @@ public class IrisRegionSpot
|
||||
@Desc("The shuffle or how natural the splotch looks like (anti-polygon)")
|
||||
private double shuffle = 128;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("If the noise multiplier is below zero, what should the air be filled with?")
|
||||
private IrisBiomePaletteLayer air = new IrisBiomePaletteLayer().zero();
|
||||
|
||||
private transient CellGenerator spot;
|
||||
|
||||
public IrisRegionSpot()
|
||||
@@ -42,6 +50,23 @@ public class IrisRegionSpot
|
||||
|
||||
}
|
||||
|
||||
public double getSpotHeight(RNG rng, double x, double z)
|
||||
{
|
||||
if(getNoiseMultiplier() == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(spot == null)
|
||||
{
|
||||
spot = new CellGenerator(rng.nextParallelRNG((int) (168583 * (shuffle + 102) + rarity + (scale * 10465) + biome.length() + type.ordinal() + as.ordinal())));
|
||||
spot.setCellScale(scale);
|
||||
spot.setShuffle(shuffle);
|
||||
}
|
||||
|
||||
return spot.getDistance(x, z) * getNoiseMultiplier();
|
||||
}
|
||||
|
||||
public boolean isSpot(RNG rng, double x, double z)
|
||||
{
|
||||
if(spot == null)
|
||||
|
||||
Reference in New Issue
Block a user