Record Class DensityFunctions.WeirdScaledSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.DensityFunctions.WeirdScaledSampler
- All Implemented Interfaces:
DensityFunction
,DensityFunctions.TransformerWithContext
- Enclosing class:
- DensityFunctions
protected static record DensityFunctions.WeirdScaledSampler(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper)
extends Record
implements DensityFunctions.TransformerWithContext
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
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 TypeFieldDescriptionstatic final KeyDispatchDataCodec<DensityFunctions.WeirdScaledSampler>
private static final com.mojang.serialization.MapCodec<DensityFunctions.WeirdScaledSampler>
private final DensityFunction
The field for theinput
record component.private final DensityFunction.NoiseHolder
The field for thenoise
record component.private final DensityFunctions.WeirdScaledSampler.RarityValueMapper
The field for therarityValueMapper
record component.Fields inherited from interface net.minecraft.world.level.levelgen.DensityFunction
DIRECT_CODEC, HOLDER_HELPER_CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
WeirdScaledSampler
(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper) Creates an instance of aWeirdScaledSampler
record class. -
Method Summary
Modifier and TypeMethodDescriptionKeyDispatchDataCodec<? extends DensityFunction>
codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.input()
Returns the value of theinput
record component.mapAll
(DensityFunction.Visitor p_208443_) double
maxValue()
double
minValue()
noise()
Returns the value of thenoise
record component.Returns the value of therarityValueMapper
record component.final String
toString()
Returns a string representation of this record class.double
transform
(DensityFunction.FunctionContext p_208440_, double p_208441_) 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.TransformerWithContext
compute, fillArray
-
Field Details
-
input
The field for theinput
record component. -
noise
The field for thenoise
record component. -
rarityValueMapper
The field for therarityValueMapper
record component. -
DATA_CODEC
private static final com.mojang.serialization.MapCodec<DensityFunctions.WeirdScaledSampler> DATA_CODEC -
CODEC
-
-
Constructor Details
-
WeirdScaledSampler
protected WeirdScaledSampler(DensityFunction input, DensityFunction.NoiseHolder noise, DensityFunctions.WeirdScaledSampler.RarityValueMapper rarityValueMapper) Creates an instance of aWeirdScaledSampler
record class.- Parameters:
input
- the value for theinput
record componentnoise
- the value for thenoise
record componentrarityValueMapper
- the value for therarityValueMapper
record component
-
-
Method Details
-
transform
- Specified by:
transform
in interfaceDensityFunctions.TransformerWithContext
-
mapAll
- Specified by:
mapAll
in interfaceDensityFunction
-
minValue
public double minValue()- Specified by:
minValue
in interfaceDensityFunction
-
maxValue
public double maxValue()- Specified by:
maxValue
in interfaceDensityFunction
-
codec
- Specified by:
codec
in interfaceDensityFunction
-
input
Returns the value of theinput
record component.- Specified by:
input
in interfaceDensityFunctions.TransformerWithContext
- Returns:
- the value of the
input
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)
. -
noise
Returns the value of thenoise
record component.- Returns:
- the value of the
noise
record component
-
rarityValueMapper
Returns the value of therarityValueMapper
record component.- Returns:
- the value of the
rarityValueMapper
record component
-