Record Class DensityFunctions.BlendDensity
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.BlendDensity
- All Implemented Interfaces:
DensityFunction, DensityFunctions.TransformerWithContext
- Enclosing class:
DensityFunctions
private static record DensityFunctions.BlendDensity(DensityFunction input)
extends Record
implements DensityFunctions.TransformerWithContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final KeyDispatchDataCodec<DensityFunctions.BlendDensity> private final DensityFunctionThe field for theinputrecord component.Fields inherited from interface DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlendDensity(DensityFunction input) Creates an instance of aBlendDensityrecord class. -
Method Summary
Modifier 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 visitor) doublemaxValue()doubleminValue()final StringtoString()Returns a string representation of this record class.doubletransform(DensityFunction.FunctionContext context, double input) Methods inherited from interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeezeMethods inherited from interface DensityFunctions.TransformerWithContext
compute, fillArray
-
Field Details
-
input
The field for theinputrecord component. -
CODEC
-
-
Constructor Details
-
BlendDensity
Creates an instance of aBlendDensityrecord class.- Parameters:
input- the value for theinputrecord component
-
-
Method Details
-
transform
- Specified by:
transformin interfaceDensityFunctions.TransformerWithContext
-
mapAll
- Specified by:
mapAllin interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
codec
- Specified by:
codecin interfaceDensityFunction
-
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 withObjects::equals(Object,Object). -
input
Returns the value of theinputrecord component.- Specified by:
inputin interfaceDensityFunctions.TransformerWithContext- Returns:
- the value of the
inputrecord component
-