mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
document biome pipeline
This commit is contained in:
parent
e39730c238
commit
e8e80c9a7a
@ -8,6 +8,7 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Description;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
|
||||
import java.util.List;
|
||||
@ -24,14 +25,25 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
public class BiomePipelineTemplate extends BiomeProviderTemplate {
|
||||
@Value("pipeline.initial-size")
|
||||
@Default
|
||||
@Description("""
|
||||
The initial size of biome chunks. This value must be at least 2.
|
||||
<b>This is not the final size of biome chunks. Final chunks will be much larger</b>.
|
||||
|
||||
It is recommended to keep biome chunks' final size in the range of [50, 300]
|
||||
to prevent performance issues. To calculate the size of biome chunks, simply
|
||||
take initial-size and for each expand stage, multiply the running value by 2
|
||||
and subtract 1. (The size is also printed to the server console if you
|
||||
have debug mode enabled)""")
|
||||
private @Meta int initialSize = 2;
|
||||
|
||||
@Value("pipeline.stages")
|
||||
private @Meta List<@Meta Stage> stages;
|
||||
|
||||
@Value("pipeline.source")
|
||||
@Description("The Biome Source to use for initial population of biomes.")
|
||||
private @Meta BiomeSource source;
|
||||
|
||||
@Value("pipeline.stages")
|
||||
@Description("A list of pipeline stages to apply to the result of #source")
|
||||
private @Meta List<@Meta Stage> stages;
|
||||
|
||||
@Override
|
||||
public BiomeProvider get() {
|
||||
BiomePipeline.BiomePipelineBuilder biomePipelineBuilder = new BiomePipeline.BiomePipelineBuilder(initialSize);
|
||||
|
@ -8,6 +8,7 @@
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Description;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
||||
|
||||
@ -19,11 +20,18 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||
public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvider> {
|
||||
@Value("resolution")
|
||||
@Default
|
||||
@Description("""
|
||||
The resolution at which to sample biomes.
|
||||
|
||||
Larger values are quadratically faster, but produce lower quality results.
|
||||
For example, a value of 3 would sample every 3 blocks.""")
|
||||
protected @Meta int resolution = 1;
|
||||
@Value("blend.noise")
|
||||
@Default
|
||||
@Description("A noise sampler to use for blending the edges of biomes via domain warping.")
|
||||
protected @Meta NoiseSampler blend = NoiseSampler.zero();
|
||||
@Value("blend.amplitude")
|
||||
@Default
|
||||
@Description("The amplitude at which to perform blending.")
|
||||
protected @Meta double blendAmp = 0d;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
package com.dfsek.terra.addons.biome.pipeline.config;
|
||||
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Description;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
|
||||
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
|
||||
@ -19,9 +20,11 @@ import com.dfsek.terra.api.util.collection.ProbabilityCollection;
|
||||
|
||||
public class NoiseSourceTemplate extends SourceTemplate {
|
||||
@Value("noise")
|
||||
@Description("The noise function to distribute biomes.")
|
||||
private @Meta NoiseSampler noise;
|
||||
|
||||
@Value("biomes")
|
||||
@Description("The biomes to be distributed.")
|
||||
private @Meta ProbabilityCollection<@Meta BiomeDelegate> biomes;
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user