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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionNoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold) Creates an instance of aNoiseThresholdConditionSourcerecord class.
- 
Method SummaryModifier 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- 
noiseThe field for thenoiserecord component.
- 
minThresholdprivate final double minThresholdThe field for theminThresholdrecord component.
- 
maxThresholdprivate final double maxThresholdThe field for themaxThresholdrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
NoiseThresholdConditionSourceNoiseThresholdConditionSource(ResourceKey<NormalNoise.NoiseParameters> noise, double minThreshold, double maxThreshold) Creates an instance of aNoiseThresholdConditionSourcerecord class.- Parameters:
- noise- the value for the- noiserecord component
- minThreshold- the value for the- minThresholdrecord component
- maxThreshold- the value for the- maxThresholdrecord component
 
 
- 
- 
Method Details- 
codec- Specified by:
- codecin interface- SurfaceRules.ConditionSource
 
- 
apply- Specified by:
- applyin interface- Function<SurfaceRules.Context,- SurfaceRules.Condition> 
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
noiseReturns the value of thenoiserecord component.- Returns:
- the value of the noiserecord component
 
- 
minThresholdpublic double minThreshold()Returns the value of theminThresholdrecord component.- Returns:
- the value of the minThresholdrecord component
 
- 
maxThresholdpublic double maxThreshold()Returns the value of themaxThresholdrecord component.- Returns:
- the value of the maxThresholdrecord component
 
 
-