Optimization

This commit is contained in:
Daniel Mills
2020-09-02 21:06:01 -04:00
parent e6b59bc16d
commit 9aa6d1c0fc
19 changed files with 242 additions and 307 deletions

View File

@@ -200,10 +200,10 @@ public class GenLayerBiome extends GenLayer
double x = bx / iris.getDimension().getBiomeZoom();
double z = bz / iris.getDimension().getBiomeZoom();
if(!parent.getRealChildren(iris).isEmpty())
if(parent.getRealChildren(iris).isNotEmpty())
{
CNG childCell = parent.getChildrenGenerator(rng, 123, parent.getChildShrinkFactor());
KList<IrisBiome> chx = parent.getRealChildren(iris).copy(); // TODO Cache
KList<IrisBiome> chx = parent.getRealChildren(iris).copy();
chx.add(parent);
IrisBiome biome = childCell.fitRarity(chx, x, z);
biome.setInferredType(parent.getInferredType());

View File

@@ -40,9 +40,9 @@ public class GenLayerCave extends GenLayer
}
KList<CaveResult> result = new KList<>();
gg.SetNoiseType(NoiseType.Cellular);
gg.SetCellularReturnType(CellularReturnType.Distance2Sub);
gg.SetCellularDistanceFunction(CellularDistanceFunction.Natural);
gg.setNoiseType(NoiseType.Cellular);
gg.setCellularReturnType(CellularReturnType.Distance2Sub);
gg.setCellularDistanceFunction(CellularDistanceFunction.Natural);
for(int i = 0; i < iris.getDimension().getCaveLayers().size(); i++)
{