Interface NoiseThresholdProvider
- All Superinterfaces:
BlockStateProvider, NoiseBasedProvider, Wrapper
Uses different block states when a noise value above or below the threshold.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface NoiseBasedProvider
NoiseBasedProvider.AbstractNoiseProviderBuilder<B,T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.The default block state.floatIf the noise value is higher than the threshold, the block states inhighStates()will be selected with a probability of this value.List of block states to choose from when higher than threshold.List of block states to choose from when lower than threshold.static NoiseThresholdProviderof(long seed, NoiseParameters parameters, float scale, float threshold, float highChance, BlockData defaultState, List<BlockData> lowStates, List<BlockData> highStates) Creates a new noise threshold provider.floatThe threshold of the noise value between -1.0 and 1.0.default NoiseThresholdProvider.BuilderConverts this object back to a builder.Methods inherited from interface NoiseBasedProvider
noise, scale, seedMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
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 inlowStates()will be selected.- Returns:
- the threshold of the noise value
- Since:
- 3.0.0
-
highChance
If the noise value is higher than the threshold, the block states inhighStates()will be selected with a probability of this value.- Returns:
- the high chance of the noise value
- Since:
- 3.0.0
-
defaultState
The default block state. This value is used when the noise value is higher than the threshold buthighStates()is not selected according tohighChance().- Returns:
- the default block state
- Since:
- 3.0.0
-
lowStates
-
highStates
-
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 noiseparameters- the parameters of the noisescale- the scale of the noisethreshold- the threshold of the noisehighChance- the high chance of the noisedefaultState- the default block statelowStates- the list of block states to choose from when lower than thresholdhighStates- the list of block states to choose from when higher than threshold- Returns:
- a new noise threshold provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-