Record Class DensityFunctions.WeirdScaledSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.WeirdScaledSampler
- All Implemented Interfaces:
- DensityFunction,- DensityFunctions.TransformerWithContext
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.WeirdScaledSampler(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper)
extends Record
implements DensityFunctions.TransformerWithContext
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.WeirdScaledSampler>private static final com.mojang.serialization.MapCodec<DensityFunctions.WeirdScaledSampler>private final DensityFunctionThe field for theinputrecord component.private final DensityFunction.NoiseHolderThe field for thenoiserecord component.private final DensityFunctions.WeirdScaledSampler.RarityValueMapperThe field for therarityValueMapperrecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunctionDIRECT_CODEC, HOLDER_HELPER_CODEC
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedWeirdScaledSampler(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper) Creates an instance of aWeirdScaledSamplerrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.mapAll(DensityFunction.Visitor p_208443_) doublemaxValue()doubleminValue()noise()Returns the value of thenoiserecord component.Returns the value of therarityValueMapperrecord component.final StringtoString()Returns a string representation of this record class.doubletransform(DensityFunction.FunctionContext p_208440_, double p_208441_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctionabs, clamp, cube, halfNegative, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TransformerWithContextcompute, fillArray
- 
Field Details- 
inputThe field for theinputrecord component.
- 
noiseThe field for thenoiserecord component.
- 
rarityValueMapperThe field for therarityValueMapperrecord component.
- 
DATA_CODECprivate static final com.mojang.serialization.MapCodec<DensityFunctions.WeirdScaledSampler> DATA_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
WeirdScaledSamplerprotected WeirdScaledSampler(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper) Creates an instance of aWeirdScaledSamplerrecord class.- Parameters:
- input- the value for the- inputrecord component
- noise- the value for the- noiserecord component
- rarityValueMapper- the value for the- rarityValueMapperrecord component
 
 
- 
- 
Method Details- 
transform- Specified by:
- transformin interface- DensityFunctions.TransformerWithContext
 
- 
mapAll- Specified by:
- mapAllin interface- DensityFunction
 
- 
minValuepublic double minValue()- Specified by:
- minValuein interface- DensityFunction
 
- 
maxValuepublic double maxValue()- Specified by:
- maxValuein interface- DensityFunction
 
- 
codec- Specified by:
- codecin interface- DensityFunction
 
- 
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. All components in this record class are compared withObjects::equals(Object,Object).
- 
inputReturns the value of theinputrecord component.- Specified by:
- inputin interface- DensityFunctions.TransformerWithContext
- Returns:
- the value of the inputrecord component
 
- 
noiseReturns the value of thenoiserecord component.- Returns:
- the value of the noiserecord component
 
- 
rarityValueMapperReturns the value of therarityValueMapperrecord component.- Returns:
- the value of the rarityValueMapperrecord component
 
 
-