Class EarthBiomeProvider
java.lang.Object
net.buildtheearth.terracore.worldgen.generator.EarthBiomeProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCacheLoaderimplementation forEarthBiomeProviderwhich asynchronously aggregates information from multiple datasets and stores it in aImmutableCompactArrayfor use by the generator. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.google.common.cache.LoadingCache<net.buildtheearth.terracore.minecraft.ChunkPos, CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>>> -
Constructor Summary
ConstructorsConstructorDescriptionEarthBiomeProvider(com.google.common.cache.LoadingCache<net.buildtheearth.terracore.minecraft.ChunkPos, CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>>> cache) EarthBiomeProvider(@NonNull EarthGeneratorSettings settings) EarthBiomeProvider(@NonNull GeneratorDatasets datasets, @NonNull IEarthBiomeFilter<?>[] filters) Construct a biome provider that uses custom biome filters which use custom datasets to provide the biomes per chunk -
Method Summary
Modifier and TypeMethodDescriptionbooleanareBiomesViable(int x, int z, int radius, List<net.buildtheearth.terracore.minecraft.Biome> allowed) @Nullable net.buildtheearth.terracore.minecraft.BlockPosfindBiomePosition(int x, int z, int range, List<net.buildtheearth.terracore.minecraft.Biome> biomes, Random random) net.buildtheearth.terracore.minecraft.BiomegetBiome(net.buildtheearth.terracore.minecraft.BlockPos pos) Deprecated.net.buildtheearth.terracore.minecraft.Biome[]getBiomes(@Nullable net.buildtheearth.terracore.minecraft.Biome[] oldBiomeList, int x, int z, int width, int depth) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos)net.buildtheearth.terracore.minecraft.Biome[]getBiomes(@Nullable net.buildtheearth.terracore.minecraft.Biome[] arr, int x, int z, int width, int length, boolean cacheFlag) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos)ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome> getBiomesForChunk(net.buildtheearth.terracore.minecraft.ChunkPos pos) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos)CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>> getBiomesForChunkAsync(net.buildtheearth.terracore.minecraft.ChunkPos pos) Gets the biomes in the given chunk.net.buildtheearth.terracore.minecraft.Biome[]getBiomesForGeneration(net.buildtheearth.terracore.minecraft.Biome[] arr, int x, int z, int width, int height) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos)
-
Field Details
-
cache
protected final com.google.common.cache.LoadingCache<net.buildtheearth.terracore.minecraft.ChunkPos,CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>>> cache
-
-
Constructor Details
-
EarthBiomeProvider
-
EarthBiomeProvider
public EarthBiomeProvider(@NonNull @NonNull GeneratorDatasets datasets, @NonNull @NonNull IEarthBiomeFilter<?>[] filters) Construct a biome provider that uses custom biome filters which use custom datasets to provide the biomes per chunk- Parameters:
datasets- Datasets that the EarthBiomeProvider should use to retreat datafilters- Biome filters which get executed for each chunk
-
EarthBiomeProvider
public EarthBiomeProvider(com.google.common.cache.LoadingCache<net.buildtheearth.terracore.minecraft.ChunkPos, CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>>> cache)
-
-
Method Details
-
getBiomesForChunk
@Deprecated public ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome> getBiomesForChunk(net.buildtheearth.terracore.minecraft.ChunkPos pos) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos) -
getBiomesForChunkAsync
public CompletableFuture<ImmutableCompactArray<net.buildtheearth.terracore.minecraft.Biome>> getBiomesForChunkAsync(net.buildtheearth.terracore.minecraft.ChunkPos pos) Gets the biomes in the given chunk.- Parameters:
pos- the position of the chunk- Returns:
- a
CompletableFuturewhich will be completed with the biomes in the chunk
-
getBiome
@Deprecated public net.buildtheearth.terracore.minecraft.Biome getBiome(net.buildtheearth.terracore.minecraft.BlockPos pos) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos) -
getBiomesForGeneration
@Deprecated public net.buildtheearth.terracore.minecraft.Biome[] getBiomesForGeneration(net.buildtheearth.terracore.minecraft.Biome[] arr, int x, int z, int width, int height) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos) -
getBiomes
@Deprecated public net.buildtheearth.terracore.minecraft.Biome[] getBiomes(@Nullable @Nullable net.buildtheearth.terracore.minecraft.Biome[] oldBiomeList, int x, int z, int width, int depth) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos) -
getBiomes
@Deprecated public net.buildtheearth.terracore.minecraft.Biome[] getBiomes(@Nullable @Nullable net.buildtheearth.terracore.minecraft.Biome[] arr, int x, int z, int width, int length, boolean cacheFlag) Deprecated.this method is blocking, usegetBiomesForChunkAsync(ChunkPos) -
areBiomesViable
public boolean areBiomesViable(int x, int z, int radius, List<net.buildtheearth.terracore.minecraft.Biome> allowed) -
findBiomePosition
-
getBiomesForChunkAsync(ChunkPos)