Class BlockStateProvider

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.state.provider.BlockStateProvider
Direct Known Subclasses:
NoiseThresholdBlockStateProvider, RotatedBlockStateProvider, SimpleBlockStateProvider, WeightedBlockStateProvider

public abstract class BlockStateProvider extends Object
The base class for all block state providers.

Providers are used by features to dynamically determine which block state to place at a specific coordinate, allowing for randomization, weighting, and noise-driven terrain composition.

  • Field Details

    • CODEC

      public static final Codec<BlockStateProvider> CODEC
      Polymorphic codec for serializing and deserializing any block state provider implementation.
  • Constructor Details

    • BlockStateProvider

      public BlockStateProvider()
  • Method Details

    • getState

      public abstract BlockInfo getState(Random random, org.bukkit.Location location)
      Determines the specific block info to place at the given location.
      Parameters:
      random - The deterministic random source.
      location - The absolute location where the block will be placed.
      Returns:
      The selected block info.
    • getType

      public abstract BlockStateProviderType<?> getType()
      Retrieves the provider type used for identifying this specific implementation.
      Returns:
      The block state provider type associated with this instance.