Class TreeCoverBaker
java.lang.Object
net.buildtheearth.terraminusminus.generator.data.TreeCoverBaker
- All Implemented Interfaces:
IEarthDataBaker<double[]>,IEarthAsyncPipelineStep<double[],CachedChunkData, CachedChunkData.Builder>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbake(ChunkPos pos, CachedChunkData.Builder builder, double[] treeCover) Bakes the retrieved data into the chunk data for the given column.CompletableFuture<double[]> requestData(ChunkPos pos, GeneratorDatasets datasets, Bounds2d bounds, CornerBoundingBox2d boundsGeo) Asynchronously fetches the data required to bake the data for the given column.
-
Field Details
-
TREE_AREA
public static final double TREE_AREA- See Also:
-
FALLBACK_TREE_DENSITY
public static final byte[] FALLBACK_TREE_DENSITY
-
-
Constructor Details
-
TreeCoverBaker
public TreeCoverBaker()
-
-
Method Details
-
requestData
public CompletableFuture<double[]> requestData(ChunkPos pos, GeneratorDatasets datasets, Bounds2d bounds, CornerBoundingBox2d boundsGeo) throws OutOfProjectionBoundsException Description copied from interface:IEarthAsyncPipelineStepAsynchronously fetches the data required to bake the data for the given column.- Specified by:
requestDatain interfaceIEarthAsyncPipelineStep<double[],CachedChunkData, CachedChunkData.Builder> - Parameters:
pos- the position of the columndatasets- the datasets to be usedbounds- the bounding box of the chunk (in blocks)boundsGeo- the bounding box of the chunk (in world coordinates)- Returns:
- a
CompletableFuturewhich will be completed with the required data - Throws:
OutOfProjectionBoundsException
-
bake
Description copied from interface:IEarthAsyncPipelineStepBakes the retrieved data into the chunk data for the given column.- Specified by:
bakein interfaceIEarthAsyncPipelineStep<double[],CachedChunkData, CachedChunkData.Builder> - Parameters:
pos- the position of the columnbuilder- the builder for the cached chunk datatreeCover- the data to bake
-