Interface NoiseThresholdProvider

All Superinterfaces:
BlockStateProvider, NoiseBasedProvider, Wrapper

@NullMarked @AsOf("3.0.0") public interface NoiseThresholdProvider extends NoiseBasedProvider
Uses different block states when a noise value above or below the threshold.
Since:
3.0.0
See Also:
  • Method Details

    • threshold

      @AsOf("3.0.0") float threshold()
      The threshold of the noise value between -1.0 and 1.0. If the noise value is lower than this value, the block states in lowStates() will be selected.
      Returns:
      the threshold of the noise value
      Since:
      3.0.0
    • highChance

      @AsOf("3.0.0") float highChance()
      If the noise value is higher than the threshold, the block states in highStates() will be selected with a probability of this value.
      Returns:
      the high chance of the noise value
      Since:
      3.0.0
    • defaultState

      @AsOf("3.0.0") BlockData defaultState()
      The default block state. This value is used when the noise value is higher than the threshold but highStates() is not selected according to highChance().
      Returns:
      the default block state
      Since:
      3.0.0
    • lowStates

      @AsOf("3.0.0") List<BlockData> lowStates()
      List of block states to choose from when lower than threshold. This cannot be empty.
      Returns:
      the list of block states
      Since:
      3.0.0
    • highStates

      @AsOf("3.0.0") List<BlockData> highStates()
      List of block states to choose from when higher than threshold. This cannot be empty.
      Returns:
      the list of block states
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default NoiseThresholdProvider.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static NoiseThresholdProvider of(long seed, NoiseParameters parameters, float scale, float threshold, float highChance, BlockData defaultState, List<BlockData> lowStates, List<BlockData> highStates)
      Creates a new noise threshold provider.
      Parameters:
      seed - the seed of the noise
      parameters - the parameters of the noise
      scale - the scale of the noise
      threshold - the threshold of the noise
      highChance - the high chance of the noise
      defaultState - the default block state
      lowStates - the list of block states to choose from when lower than threshold
      highStates - the list of block states to choose from when higher than threshold
      Returns:
      a new noise threshold provider
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static NoiseThresholdProvider.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0