Record Class SplineFunction.SamplerCoordinate
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.SplineFunction.SamplerCoordinate
- All Implemented Interfaces:
BoundedFloatFunction<SplineFunction.SplineInput>
- Enclosing class:
SplineFunction
private static record SplineFunction.SamplerCoordinate(DensitySampler sampler, int index, Interval range)
extends Record
implements BoundedFloatFunction<SplineFunction.SplineInput>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theindexrecord component.private final IntervalThe field for therangerecord component.private final DensitySamplerThe field for thesamplerrecord component.Fields inherited from interface BoundedFloatFunction
IDENTITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSamplerCoordinate(DensitySampler sampler, int index, Interval range) Creates an instance of aSamplerCoordinaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatapply(SplineFunction.SplineInput input) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.range()Returns the value of therangerecord component.sampler()Returns the value of thesamplerrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface BoundedFloatFunction
comap
-
Field Details
-
sampler
The field for thesamplerrecord component. -
index
private final int indexThe field for theindexrecord component. -
range
The field for therangerecord component.
-
-
Constructor Details
-
SamplerCoordinate
Creates an instance of aSamplerCoordinaterecord class.- Parameters:
sampler- the value for thesamplerrecord componentindex- the value for theindexrecord componentrange- the value for therangerecord component
-
-
Method Details
-
apply
- Specified by:
applyin interfaceBoundedFloatFunction<SplineFunction.SplineInput>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sampler
Returns the value of thesamplerrecord component.- Returns:
- the value of the
samplerrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
range
Returns the value of therangerecord component.- Specified by:
rangein interfaceBoundedFloatFunction<SplineFunction.SplineInput>- Returns:
- the value of the
rangerecord component
-