Record Class DensityFunctions.Slide
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Slide
- All Implemented Interfaces:
DensityFunction,DensityFunctions.TransformerWithContext
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.Slide(@Nullable NoiseSettings settings, DensityFunction input)
extends Record
implements DensityFunctions.TransformerWithContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DensityFunctions.Slide>private final DensityFunctionThe field for theinputrecord component.private final NoiseSettingsThe field for thesettingsrecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSlide(NoiseSettings settings, DensityFunction input) Creates an instance of aSliderecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? 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_208983_) doublemaxValue()doubleminValue()settings()Returns the value of thesettingsrecord component.final StringtoString()Returns a string representation of this record class.doubletransform(DensityFunction.FunctionContext p_208980_, double p_208981_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeezeMethods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.TransformerWithContext
compute, fillArray
-
Field Details
-
settings
The field for thesettingsrecord component. -
input
The field for theinputrecord component. -
CODEC
-
-
Constructor Details
-
Slide
Creates an instance of aSliderecord class.- Parameters:
settings- the value for thesettingsrecord componentinput- 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
-
input
Returns the value of theinputrecord component.- Specified by:
inputin interfaceDensityFunctions.TransformerWithContext- Returns:
- the value of the
inputrecord component
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
settings
Returns the value of thesettingsrecord component.- Returns:
- the value of the
settingsrecord component
-