Class EarthBiomeProvider

java.lang.Object
net.buildtheearth.terracore.worldgen.generator.EarthBiomeProvider

public class EarthBiomeProvider extends Object
  • 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

      public EarthBiomeProvider(@NonNull @NonNull EarthGeneratorSettings settings)
    • 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 data
      filters - 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, use getBiomesForChunkAsync(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 CompletableFuture which 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, use getBiomesForChunkAsync(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, use getBiomesForChunkAsync(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, use getBiomesForChunkAsync(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, use getBiomesForChunkAsync(ChunkPos)
    • areBiomesViable

      public boolean areBiomesViable(int x, int z, int radius, List<net.buildtheearth.terracore.minecraft.Biome> allowed)
    • findBiomePosition

      @Nullable public @Nullable net.buildtheearth.terracore.minecraft.BlockPos findBiomePosition(int x, int z, int range, List<net.buildtheearth.terracore.minecraft.Biome> biomes, Random random)