Interface TrapezoidHeight
- All Superinterfaces:
HeightProvider, Wrapper
A height provider which samples an isosceles trapezoidal distribution between
HeightProvider.minInclusive() and HeightProvider.maxInclusive() with a flat plateau().- 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 TrapezoidHeight.Builderbuilder()Creates a new builder.static TrapezoidHeightof(VerticalAnchor minInclusive, VerticalAnchor maxInclusive, int plateau) Creates a new trapezoid height provider.intplateau()The length of the range in the middle that has a uniform distribution.default TrapezoidHeight.BuilderConverts this object back to a builder.Methods inherited from interface HeightProvider
maxInclusive, minInclusiveMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
plateau
The length of the range in the middle that has a uniform distribution.- Returns:
- the plateau
- Since:
- 3.0.0
-
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 TrapezoidHeight of(VerticalAnchor minInclusive, VerticalAnchor maxInclusive, int plateau) Creates a new trapezoid height provider.- Parameters:
minInclusive- the vertical anchor to use as the minimum heightmaxInclusive- the vertical anchor to use as the maximum heightplateau- the length of the range in the middle that has a uniform distribution- Returns:
- the trapezoid height provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-