Fix deposit placements

This commit is contained in:
Daniel Mills 2020-07-25 13:23:05 -04:00
parent e1824ffda1
commit bbd394b95e
2 changed files with 9 additions and 3 deletions

View File

@ -42,7 +42,7 @@ public class GenLayerCave extends GenLayer
gg.SetCellularReturnType(CellularReturnType.Distance2Sub);
gg.SetCellularDistanceFunction(CellularDistanceFunction.Natural);
for(int i = 0; i < 3; i++)
for(int i = 0; i < 4; i++)
{
double wx = wxx + (shuffle.noise(wxx, wzz) * shuffleDistance);
double wz = wzz + (shuffle.noise(wzz, wxx) * shuffleDistance);
@ -50,7 +50,7 @@ public class GenLayerCave extends GenLayer
double baseWidth = (9 * iris.getDimension().getCaveScale());
double distanceCheck = 0.0132 * baseWidth;
double distanceTake = 0.0032 * baseWidth;
double drop = 44 + iris.getDimension().getCaveShift();
double drop = (-i * 7) + 44 + iris.getDimension().getCaveShift();
double caveHeightNoise = incline * gincline.noise((wx + (10000 * i)), (wz - (10000 * i)));
caveHeightNoise += shuffle.fitDoubleD(-1, 1, wxx - caveHeightNoise, wzz + caveHeightNoise) * 3;
for(double tunnelHeight = 1; tunnelHeight <= baseWidth; tunnelHeight++)

View File

@ -146,7 +146,13 @@ public class IrisDepositGenerator
public void generate(int x, int z, RNG rng, ParallaxChunkGenerator g)
{
IrisObject clump = getClump(rng);
int height = (int) (Math.round(g.getTerrainHeight(x, z)));
int height = (int) (Math.round(g.getTerrainHeight(x, z))) - 5;
if(height < 0)
{
return;
}
int i = Math.max(0, minHeight);
int a = Math.min(height, Math.min(256, maxHeight));