Record Class PowFunction.ConstExponentSampler
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.densityfunction.op.PowFunction.ConstExponentSampler
- All Implemented Interfaces:
DensitySampler
- Enclosing class:
PowFunction
private static record PowFunction.ConstExponentSampler(DensitySampler base, double exponent)
extends Record
implements DensitySampler
-
Nested Class Summary
Nested classes/interfaces inherited from interface DensitySampler
DensitySampler.Bound -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DensitySamplerThe field for thebaserecord component.private final doubleThe field for theexponentrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstExponentSampler(DensitySampler base, double exponent) Creates an instance of aConstExponentSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.doubleexponent()Returns the value of theexponentrecord component.final inthashCode()Returns a hash code value for this object.floatsampleValue(SamplerContext context, int blockX, int blockY, int blockZ) voidsampleVolume(SamplerContext context, DensityBuffer outputBuffer, DensityVolume volume) final StringtoString()Returns a string representation of this record class.Methods inherited from interface DensitySampler
bind
-
Field Details
-
base
The field for thebaserecord component. -
exponent
private final double exponentThe field for theexponentrecord component.
-
-
Constructor Details
-
ConstExponentSampler
Creates an instance of aConstExponentSamplerrecord class.- Parameters:
base- the value for thebaserecord componentexponent- the value for theexponentrecord component
-
-
Method Details
-
sampleVolume
- Specified by:
sampleVolumein interfaceDensitySampler
-
sampleValue
- Specified by:
sampleValuein interfaceDensitySampler
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
exponent
public double exponent()Returns the value of theexponentrecord component.- Returns:
- the value of the
exponentrecord component
-