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 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 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 context) final booleanIndicates whether some other object is "equal to" this one.voidfillArray(double[] output, DensityFunction.ContextProvider contextProvider) 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 interface DensityFunction
abs, clamp, cube, halfNegative, invert, quarterNegative, square, squeezeMethods inherited from interface 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
-
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). -
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
-