Record Class FloatProvider.Trapezoid
java.lang.Object
java.lang.Record
dev.wyck.wrapper.worldgen.valueproviders.FloatProvider.Trapezoid
- All Implemented Interfaces:
Wrapper, FloatProvider
- Enclosing interface:
FloatProvider
@AsOf("2.3.0")
public static record FloatProvider.Trapezoid(float min, float max, float plateau)
extends Record
implements FloatProvider
- Since:
- 2.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface FloatProvider
FloatProvider.ClampedNormal, FloatProvider.Constant, FloatProvider.Factory, FloatProvider.Trapezoid, FloatProvider.UniformNested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields inherited from interface FloatProvider
WIRE -
Constructor Summary
ConstructorsConstructorDescriptionTrapezoid(float min, float max, float plateau) Creates an instance of aTrapezoidrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmax()Returns the value of themaxrecord component.floatmaxValue()floatmin()Returns the value of theminrecord component.floatminValue()floatplateau()Returns the value of theplateaurecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface FloatProvider
toMinecraft
-
Constructor Details
-
Trapezoid
public Trapezoid(float min, float max, float plateau) Creates an instance of aTrapezoidrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentplateau- the value for theplateaurecord component
-
-
Method Details
-
minValue
public float minValue()- Specified by:
minValuein interfaceFloatProvider- Returns:
- the smallest value this provider can yield.
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceFloatProvider- Returns:
- the largest value this provider can yield.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
min
public float min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public float max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
plateau
public float plateau()Returns the value of theplateaurecord component.- Returns:
- the value of the
plateaurecord component
-