Record Class DensityFunctions.Marker
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.Marker
- All Implemented Interfaces:
DensityFunction,DensityFunctions.MarkerOrMarked
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.Marker(DensityFunctions.Marker.Type type, DensityFunction wrapped)
extends Record
implements DensityFunctions.MarkerOrMarked
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DensityFunction.ContextProvider, DensityFunction.FunctionContext, DensityFunction.NoiseHolder, DensityFunction.SimpleFunction, DensityFunction.SinglePointContext, DensityFunction.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensityFunctions.Marker.TypeThe field for thetyperecord component.private final DensityFunctionThe field for thewrappedrecord component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMarker(DensityFunctions.Marker.Type type, DensityFunction wrapped) Creates an instance of aMarkerrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(DensityFunction.FunctionContext p_208712_) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] p_208716_, DensityFunction.ContextProvider p_208717_) final inthashCode()Returns a hash code value for this object.doublemaxValue()doubleminValue()final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.wrapped()Returns the value of thewrappedrecord component.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.MarkerOrMarked
codec, mapAll
-
Field Details
-
type
The field for thetyperecord component. -
wrapped
The field for thewrappedrecord component.
-
-
Constructor Details
-
Marker
Creates an instance of aMarkerrecord class.- Parameters:
type- the value for thetyperecord componentwrapped- the value for thewrappedrecord component
-
-
Method Details
-
compute
- Specified by:
computein interfaceDensityFunction
-
fillArray
- Specified by:
fillArrayin interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValuein interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValuein interfaceDensityFunction
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceDensityFunctions.MarkerOrMarked- Returns:
- the value of the
typerecord component
-
wrapped
Returns the value of thewrappedrecord component.- Specified by:
wrappedin interfaceDensityFunctions.MarkerOrMarked- Returns:
- the value of the
wrappedrecord 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).
-