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 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
Modifier and TypeFieldDescriptionprivate final DensityFunctions.Marker.Type
The field for thetype
record component.private final DensityFunction
The field for thewrapped
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
CODEC, DIRECT_CODEC, HOLDER_HELPER_CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
Marker
(DensityFunctions.Marker.Type type, DensityFunction wrapped) Creates an instance of aMarker
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
compute
(DensityFunction.FunctionContext p_208712_) final boolean
Indicates whether some other object is "equal to" this one.void
fillArray
(double[] p_208716_, DensityFunction.ContextProvider p_208717_) final int
hashCode()
Returns a hash code value for this object.double
maxValue()
double
minValue()
final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.wrapped()
Returns the value of thewrapped
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunction
abs, clamp, cube, halfNegative, quarterNegative, square, squeeze
Methods inherited from interface net.minecraft.world.level.levelgen.DensityFunctions.MarkerOrMarked
codec, mapAll
-
Field Details
-
type
The field for thetype
record component. -
wrapped
The field for thewrapped
record component.
-
-
Constructor Details
-
Marker
Creates an instance of aMarker
record class.- Parameters:
type
- the value for thetype
record componentwrapped
- the value for thewrapped
record component
-
-
Method Details
-
compute
- Specified by:
compute
in interfaceDensityFunction
-
fillArray
- Specified by:
fillArray
in interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValue
in interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValue
in interfaceDensityFunction
-
type
Returns the value of thetype
record component.- Specified by:
type
in interfaceDensityFunctions.MarkerOrMarked
- Returns:
- the value of the
type
record component
-
wrapped
Returns the value of thewrapped
record component.- Specified by:
wrapped
in interfaceDensityFunctions.MarkerOrMarked
- Returns:
- the value of the
wrapped
record 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)
.
-