Class WeightedStateProvider.Builder

java.lang.Object
dev.wyck.worldgen.stateproviders.WeightedStateProvider.Builder
Enclosing interface:
WeightedStateProvider

@AsOf("3.0.0") public static final class WeightedStateProvider.Builder extends Object
Since:
3.0.0
  • Constructor Details

  • Method Details

    • entries

      @AsOf("3.0.0") public WeightedStateProvider.Builder entries(WeightedList<BlockData> entries)
      Sets the weighted list of block states.
      Parameters:
      entries - the weighted list of block states
      Returns:
      this builder
      Since:
      3.0.0
    • entry

      @AsOf("3.0.0") public WeightedStateProvider.Builder entry(BlockData state, int weight)
      Adds a weighted entry to the list.
      Parameters:
      state - the block state
      weight - the weight of the entry
      Returns:
      this builder
      Since:
      3.0.0
    • entry

      @AsOf("3.0.0") public WeightedStateProvider.Builder entry(Material material, int weight)
      Adds a weighted entry to the list.
      Parameters:
      material - the material of the block state
      weight - the weight of the entry
      Returns:
      this builder
      Since:
      3.0.0
    • entries

      @AsOf("3.0.0") public WeightedStateProvider.Builder entries(Map<BlockData, Integer> entries)
      Adds multiple weighted entries to the list.
      Parameters:
      entries - the weighted entries to add
      Returns:
      this builder
      Since:
      3.0.0
    • build

      @AsOf("3.0.0") public WeightedStateProvider build()
      Builds the builder.
      Returns:
      the constructed weighted state provider
      Since:
      3.0.0