mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-30 05:40:34 +00:00
fix typo
This commit is contained in:
@@ -38,7 +38,8 @@ public class TerraWorld {
|
|||||||
String partName = template.getGrids().get(i);
|
String partName = template.getGrids().get(i);
|
||||||
try {
|
try {
|
||||||
BiomeGridBuilder g = config.getBiomeGrid(partName);
|
BiomeGridBuilder g = config.getBiomeGrid(partName);
|
||||||
definedGrids[i] = g.build(w, worldConfig);
|
BiomeGrid b = g.build(w, worldConfig);
|
||||||
|
definedGrids[i] = b;
|
||||||
} catch(NullPointerException e) {
|
} catch(NullPointerException e) {
|
||||||
safe = false;
|
safe = false;
|
||||||
Debug.stack(e);
|
Debug.stack(e);
|
||||||
@@ -53,7 +54,8 @@ public class TerraWorld {
|
|||||||
if(template.isErode()) {
|
if(template.isErode()) {
|
||||||
try {
|
try {
|
||||||
BiomeGridBuilder g = Objects.requireNonNull(config.getBiomeGrid(erosionName));
|
BiomeGridBuilder g = Objects.requireNonNull(config.getBiomeGrid(erosionName));
|
||||||
erosion = g.build(w, worldConfig);
|
BiomeGrid b = g.build(w, worldConfig);
|
||||||
|
erosion = b;
|
||||||
} catch(NullPointerException e) {
|
} catch(NullPointerException e) {
|
||||||
safe = false;
|
safe = false;
|
||||||
Debug.stack(e);
|
Debug.stack(e);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.dfsek.tectonic.exception.ConfigException;
|
|||||||
import com.dfsek.tectonic.exception.LoadException;
|
import com.dfsek.tectonic.exception.LoadException;
|
||||||
import com.dfsek.tectonic.loading.ConfigLoader;
|
import com.dfsek.tectonic.loading.ConfigLoader;
|
||||||
import com.dfsek.tectonic.loading.TypeLoader;
|
import com.dfsek.tectonic.loading.TypeLoader;
|
||||||
|
import com.dfsek.terra.Debug;
|
||||||
import com.dfsek.terra.generation.config.NoiseBuilder;
|
import com.dfsek.terra.generation.config.NoiseBuilder;
|
||||||
import org.polydev.gaea.math.FastNoiseLite;
|
import org.polydev.gaea.math.FastNoiseLite;
|
||||||
|
|
||||||
@@ -28,10 +29,14 @@ public class NoiseBuilderLoader implements TypeLoader<NoiseBuilder> {
|
|||||||
public NoiseBuilder load(Type type, Object o, ConfigLoader configLoader) throws LoadException {
|
public NoiseBuilder load(Type type, Object o, ConfigLoader configLoader) throws LoadException {
|
||||||
NoiseBuilder builder = new NoiseBuilder();
|
NoiseBuilder builder = new NoiseBuilder();
|
||||||
try {
|
try {
|
||||||
|
Debug.info(o + "");
|
||||||
LOADER.load(builder, new Configuration((Map<String, Object>) o));
|
LOADER.load(builder, new Configuration((Map<String, Object>) o));
|
||||||
} catch(ConfigException e) {
|
} catch(ConfigException e) {
|
||||||
throw new LoadException("Could not load noise", e);
|
throw new LoadException("Could not load noise", e);
|
||||||
}
|
}
|
||||||
|
Debug.info("FREQ: " + builder.getFrequency());
|
||||||
|
Debug.info("FRAC: " + builder.getFractalType());
|
||||||
|
Debug.info("OCT:" + builder.getOctaves());
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class NoiseBuilder implements ConfigTemplate {
|
|||||||
@Default
|
@Default
|
||||||
private FastNoiseLite.NoiseType type = FastNoiseLite.NoiseType.OpenSimplex2;
|
private FastNoiseLite.NoiseType type = FastNoiseLite.NoiseType.OpenSimplex2;
|
||||||
|
|
||||||
@Value("octaves")
|
@Value("fractal.octaves")
|
||||||
@Default
|
@Default
|
||||||
private int octaves = 1;
|
private int octaves = 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user