mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-04 23:06:05 +00:00
document more stuff
This commit is contained in:
@@ -8,10 +8,21 @@ import com.dfsek.terra.api.math.noise.samplers.noise.ConstantSampler;
|
||||
import com.dfsek.terra.api.util.seeded.NoiseSeeded;
|
||||
import com.dfsek.terra.api.world.biome.provider.BiomeProvider;
|
||||
|
||||
/**
|
||||
* Configures a biome provider.
|
||||
*/
|
||||
public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvider.BiomeProviderBuilder>, BiomeProvider.BiomeProviderBuilder {
|
||||
/**
|
||||
* Resolution of this provider.
|
||||
* A resolution of 1 means that 1 block = 1 sample.
|
||||
*/
|
||||
@Value("resolution")
|
||||
@Default
|
||||
protected int resolution = 1;
|
||||
|
||||
/**
|
||||
* Noise function to use for blending biomes at edges.
|
||||
*/
|
||||
@Value("blend.noise")
|
||||
@Default
|
||||
protected NoiseSeeded blend = new NoiseSeeded() {
|
||||
@@ -25,11 +36,13 @@ public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvi
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Amplitude of edge blending, in blocks.
|
||||
*/
|
||||
@Value("blend.amplitude")
|
||||
@Default
|
||||
protected double blendAmp = 0d;
|
||||
@Value("type")
|
||||
BiomeProvider.Type type;
|
||||
|
||||
@Override
|
||||
public BiomeProvider.BiomeProviderBuilder get() {
|
||||
|
||||
@@ -9,11 +9,21 @@ import com.dfsek.terra.config.builder.BiomeBuilder;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Configures an image biome provider.
|
||||
*/
|
||||
public class ImageProviderTemplate extends BiomeProviderTemplate {
|
||||
private final Registry<BiomeBuilder> biomes;
|
||||
|
||||
/**
|
||||
* Image to use for biome selection.
|
||||
*/
|
||||
@Value("image.name")
|
||||
private BufferedImage image;
|
||||
|
||||
/**
|
||||
* How the image should be aligned.
|
||||
*/
|
||||
@Value("image.align")
|
||||
private ImageBiomeProvider.Align align;
|
||||
|
||||
|
||||
@@ -5,7 +5,13 @@ import com.dfsek.terra.api.world.biome.provider.BiomeProvider;
|
||||
import com.dfsek.terra.api.world.biome.provider.SingleBiomeProvider;
|
||||
import com.dfsek.terra.config.builder.BiomeBuilder;
|
||||
|
||||
/**
|
||||
* Configures a single-biome provider.
|
||||
*/
|
||||
public class SingleBiomeProviderTemplate extends BiomeProviderTemplate {
|
||||
/**
|
||||
* The biome.
|
||||
*/
|
||||
@Value("biome")
|
||||
private BiomeBuilder biome;
|
||||
|
||||
|
||||
@@ -7,10 +7,19 @@ import com.dfsek.terra.api.world.biome.pipeline.source.BiomeSource;
|
||||
import com.dfsek.terra.api.world.biome.pipeline.source.RandomSource;
|
||||
import com.dfsek.terra.config.builder.BiomeBuilder;
|
||||
|
||||
/**
|
||||
* Configures a noise-based biome source.
|
||||
*/
|
||||
public class NoiseSourceTemplate extends SourceTemplate {
|
||||
/**
|
||||
* Noise function to use for selecting biomes.
|
||||
*/
|
||||
@Value("noise")
|
||||
private NoiseSeeded noise;
|
||||
|
||||
/**
|
||||
* ProbabilityCollection of biomes to use.
|
||||
*/
|
||||
@Value("biomes")
|
||||
private ProbabilityCollection<BiomeBuilder> biomes;
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.dfsek.terra.api.util.seeded.StageSeeded;
|
||||
import com.dfsek.terra.api.world.biome.pipeline.stages.Stage;
|
||||
|
||||
public abstract class StageTemplate implements ObjectTemplate<SeededBuilder<Stage>>, StageSeeded {
|
||||
/**
|
||||
* Noise function to use for mutating biomes in this stage.
|
||||
*/
|
||||
@Value("noise")
|
||||
protected NoiseSeeded noise;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user