Interface WeightedListHeight
- All Superinterfaces:
HeightProvider, Wrapper
A height provider which picks an entry from the
distribution()
proportionally to its weight, then samples that entry's provider.- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface HeightProvider
HeightProvider.HeightProviderBuilder<T,S> -
Method Summary
Modifier and TypeMethodDescriptionstatic WeightedListHeight.Builderbuilder()Creates a new builder.The weighted pool of providers to sample from.default VerticalAnchorThe vertical anchor used as the maximum height.default VerticalAnchorThe vertical anchor used as the minimum height.static WeightedListHeightof(WeightedList<HeightProvider> distribution) Creates a new weighted list height provider.default WeightedListHeight.BuilderCreates a new builder with the same weighted distribution as this provider.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
minInclusive
Description copied from interface:HeightProviderThe vertical anchor used as the minimum height.- Specified by:
minInclusivein interfaceHeightProvider- Returns:
- the minimum anchor
-
maxInclusive
Description copied from interface:HeightProviderThe vertical anchor used as the maximum height.- Specified by:
maxInclusivein interfaceHeightProvider- Returns:
- the maximum anchor
-
distribution
The weighted pool of providers to sample from.- Returns:
- the weighted distribution
- Since:
- 3.0.0
-
toBuilder
Creates a new builder with the same weighted distribution as this provider.- Returns:
- a new builder with the same values
- Since:
- 3.3.0
-
of
Creates a new weighted list height provider.- Parameters:
distribution- the weighted pool of providers, which must not be empty- Returns:
- the weighted list height provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-