Record Class SurfaceRules.NoiseThresholdConditionSource
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.SurfaceRules.NoiseThresholdConditionSource
- All Implemented Interfaces:
Function<SurfaceRules.Context,,SurfaceRules.Condition> SurfaceRules.ConditionSource
- Enclosing class:
SurfaceRules
static record SurfaceRules.NoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold)
extends Record
implements SurfaceRules.ConditionSource
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final KeyDispatchDataCodec<SurfaceRules.NoiseThresholdConditionSource> private final doubleThe field for themaxThresholdrecord component.private final doubleThe field for theminThresholdrecord component.private final ResourceKey<NormalNoise.NoiseParameters> The field for thenoiserecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold) Creates an instance of aNoiseThresholdConditionSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(SurfaceRules.Context p_189640_) KeyDispatchDataCodec<? extends SurfaceRules.ConditionSource> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themaxThresholdrecord component.doubleReturns the value of theminThresholdrecord component.noise()Returns the value of thenoiserecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
noise
The field for thenoiserecord component. -
minThreshold
private final double minThresholdThe field for theminThresholdrecord component. -
maxThreshold
private final double maxThresholdThe field for themaxThresholdrecord component. -
CODEC
-
-
Constructor Details
-
NoiseThresholdConditionSource
NoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold) Creates an instance of aNoiseThresholdConditionSourcerecord class.- Parameters:
noise- the value for thenoiserecord componentminThreshold- the value for theminThresholdrecord componentmaxThreshold- the value for themaxThresholdrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceSurfaceRules.ConditionSource
-
apply
- Specified by:
applyin interfaceFunction<SurfaceRules.Context,SurfaceRules.Condition>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
noise
Returns the value of thenoiserecord component.- Returns:
- the value of the
noiserecord component
-
minThreshold
public double minThreshold()Returns the value of theminThresholdrecord component.- Returns:
- the value of the
minThresholdrecord component
-
maxThreshold
public double maxThreshold()Returns the value of themaxThresholdrecord component.- Returns:
- the value of the
maxThresholdrecord component
-